I want to write a macro in VBA that will find the last non empty cell in a column but there can be empty cells present in between. I want my program to search further if there is any non empty cell present in a column after it finds a blank cell. Then I want to store the value in some variable a.
The code that I used is a = Range("B1").End(xlDown).value
, but this stops when it finds an empty cell. Can anyone tell me how to solve this?
Range("B" & Rows.Count).End(xlUp).value.Row
but it didn't work. Can you please tell me the problem. – zih