If curSheet.Cells(j, i).Interior.ColorIndex = 36 Then
If tab_1_n = 0 Then
max_i = i: min_i = i: max_j = j: min_j = j
End If
tab_1_n = tab_1_n + 1
curSheet.Cells(j, i).Select
'Stop
tab_info(tab_1_n, 1) = j
tab_info(tab_1_n, 2) = i
tab_info(tab_1_n, 3) = Selection.Address:
tab_info(tab_1_n, 10) = Selection.Borders(xlEdgeTop).LineStyle:
tab_info(tab_1_n, 11) = Selection.Borders(xlEdgeBottom).LineStyle:
tab_info(tab_1_n, 12) = Selection.Borders(xlEdgeLeft).LineStyle:
tab_info(tab_1_n, 13) = Selection.Borders(xlEdgeRight).LineStyle:
tab_info(tab_1_n, 14) = Selection.Borders(xlDiagonalDown).LineStyle:
tab_info(tab_1_n, 15) = Selection.Borders(xlDiagonalUp).LineStyle:
jach = Chislo(i) & j & ":" & Chislo(i) & j
tab_info(tab_1_n, 20) = curSheet.Range(jach).Value:
tab_info(tab_1_n, 21) = Selection.HorizontalAlignment
tab_info(tab_1_n, 22) = Selection.VerticalAlignment
tab_info(tab_1_n, 23) = Selection.Font.Size
tab_info(tab_1_n, 24) = Selection.Orientation
End If
Удаление $
For i = 1 To tab_1_n
If InStr(1, tab_info(i, 3), "$", 1) > 0 And tab_info(i, 3) <> 0 Then
MyPos = InStr(1, tab_info(i, 3), "$", 1): LastWord = Mid(tab_info(i, 3), 1, MyPos - 1)
LastWord2 = Mid(tab_info(i, 3), MyPos + 1, Len(tab_info(i, 3)) - MyPos)
tab_info(i, 3) = LastWord & "" & LastWord2: K10 = 0
End If
Next i
Что бы идти вверх или вниз нужно получить координаты в числовой форме:
koord1 = Mid(LastWord, 1, 1): koord1 = Bukva_over(koord1)
koord2 = Mid(LastWord, 2, 1): koord2 = Bukva_over(koord2)
If koord2 = "-" Then tab_info(i, 30) = koord1 Else tab_info(i, 30) = koord1 * 26 + koord2
'30 - êîîðäèíàòà íà÷àëà ñòîëáöà
If koord2 = "-" Then tab_info(i, 31) = Mid(LastWord, 2, Len(LastWord) - 1) Else tab_info(i, 31) = Mid(LastWord, 3, Len(LastWord) - 2)
'31 - êîîðäèíàòà íà÷àëà ñòðîêà
Public Function Bukva_over(ch_b)
If ch_b = "A" Then Bukva_over = 1
If ch_b = "B" Then Bukva_over = 2
If ch_b = "C" Then Bukva_over = 3
If ch_b = "D" Then Bukva_over = 4
If ch_b = "E" Then Bukva_over = 5
If ch_b = "F" Then Bukva_over = 6
If ch_b = "G" Then Bukva_over = 7
If ch_b = "H" Then Bukva_over = 8
If ch_b = "I" Then Bukva_over = 9
If ch_b = "J" Then Bukva_over = 10
If ch_b = "K" Then Bukva_over = 11
If ch_b = "L" Then Bukva_over = 12
If ch_b = "M" Then Bukva_over = 13
If ch_b = "N" Then Bukva_over = 14
If ch_b = "O" Then Bukva_over = 15
If ch_b = "P" Then Bukva_over = 16
If ch_b = "Q" Then Bukva_over = 17
If ch_b = "R" Then Bukva_over = 18
If ch_b = "S" Then Bukva_over = 19
If ch_b = "T" Then Bukva_over = 20
If ch_b = "U" Then Bukva_over = 21
If ch_b = "V" Then Bukva_over = 22
If ch_b = "W" Then Bukva_over = 23
If ch_b = "X" Then Bukva_over = 24
If ch_b = "Y" Then Bukva_over = 25
If ch_b = "Z" Then Bukva_over = 26
If Bukva_over <= 26 And Bukva_over >= 1 Then Else Bukva_over = "-"
End Function