How to fill cell with data from a previous cell

M

muddan madhu

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
 
G

Gord Dibben

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top