How to fill cell with data from a previous cell

  • Thread starter Thread starter Ishi Elpitiya
  • Start date Start date
Sub test()
Dim rng As Integer, i As Integer

rng = Cells(Rows.Count, "F").End(xlUp).Row
For i = 2 To rng
Cells(i, "F").Select
ActV = ActiveCell.Offset(-1, 0).Value
If ActiveCell.Value = "" Then
ActiveCell.Value = ActV
End If
Next i
End Sub
 
Select the column then F5>Special>Blanks>OK

Type an = sign in active blank cell.

Point or arrow to cell above.

Hit CTRL + ENTER.

Copy the column then Paste Special>Values>OK>Esc.


Gord Dibben MS Excel MVP
 
Back
Top