Hi,
I wrote the code below. It didn't given an error but wouldn't work either. My goal is to fill up the activecell with the value of the previous cell if the activecell is empty. For example if A2 is banana, A3 is apple and A4 is blank, then the value of A4 should be apple. This process will continue until the lastrow in variable lRow2. I was thining of using do-while-loop but i thought it would be simple to use for-loop.
Dim lRow2 As Double
lRow2 = Columns(4).Cells.SpecialCells(xlCellTypeConstants).Count
MsgBox lRow2
For i = 3 To lRow2
If Cells(lRow2, 1).Value = Empty Then Cells(lRow2, 1).Value = Cells(lRow2 - 1, 1).Value
Next i
Bookmarks