Originally Posted by
PcMax
Use the following code to identify the last row of the range.
Can you recommend a better solution!
Code:
Dim Riga As Long
Riga = Application.WorksheetFunction.Max(Cells(Rows.Count, "A").End(xlUp).Row, _
Cells(Rows.Count, 2).End(xlUp).Row, Cells(Rows.Count, "C").End(xlUp).Row)
MsgBox Riga
Give this a try...
Code:
Riga = Columns("A:C").Find(What:="*", SearchOrder:=xlRows, _
SearchDirection:=xlPrevious, LookIn:=xlFormulas).Row
And if you do not mind maintaining empty arguments, we can shorten that code line down to this by eliminating the named arguments...
Code:
Riga = Columns("A:C").Find("*", , xlFormulas, , xlRows, xlPrevious).Row
Bookmarks