Getij

Function Getj(FileN, Optional shi = 1, Optional KeyName = "Код") As Integer
Dim c As Range
  With FileN.Worksheets(shi)
    Set c = .Cells.Find(KeyName, .Cells(.Rows.Count, .Columns.Count), xlValues, xlPart, xlByRows, xlNext, False)
    If Not c Is Nothing Then Getj = c.Column
  End With
End Function
Sub makroooo()
Range(Cells(10, 1), Cells(10, 1)) = 1000
End Sub

Добавить комментарий

Ваш адрес email не будет опубликован.