I need to use a function like
=LastRow(B2:B100)
will return B25 (B26 is last non empty cell within range B2:B100)
=LastRow(B:B)
will return B207 (B207 is last non empty cell within range B:B)
I was trying below which is not working
Any solution?
=LastRow(B2:B100)
will return B25 (B26 is last non empty cell within range B2:B100)
=LastRow(B:B)
will return B207 (B207 is last non empty cell within range B:B)
I was trying below which is not working
Code:
Public Function LastRow(iRange As Range)
LastRow = Range(iRange).Find(What:="*", SearchDirection:=xlPrevious, SearchOrder:=xlByRows).Address
End Function
Any solution?