L
L. Howard
With this test snippet:
Col A to C = text
Col D to W = formulas like: =IF(Mon!D3="","",Mon!D3)
LastCol to return column number of the cell in row 3 that the formula has returned a VALUE.
Thanks.
Howard
Sub LastColumnInOneRow()
'Find the last used column in a Row: row 3 in this example (23)
Dim LastCol As Integer
With ActiveSheet
LastCol = .Cells(3, .Columns.Count).End(xlToLeft).Column
End With
MsgBox LastCol
End Sub
Col A to C = text
Col D to W = formulas like: =IF(Mon!D3="","",Mon!D3)
LastCol to return column number of the cell in row 3 that the formula has returned a VALUE.
Thanks.
Howard
Sub LastColumnInOneRow()
'Find the last used column in a Row: row 3 in this example (23)
Dim LastCol As Integer
With ActiveSheet
LastCol = .Cells(3, .Columns.Count).End(xlToLeft).Column
End With
MsgBox LastCol
End Sub