I have a column with some values that are separated by different number of empty cells. How can I copy each of these value to the n empty cells below them? In my case n = 3 is no bigger than the minimum number of empty space between them.
Thanks for your reply. I know this methods, but it will autofill the value to all the empty cells below it. Like AAAAAAAAABBBBCCCC. I would like each value copied only 3 times, something like AAAA-----BBBBCCCC, -stands for empty cells.Manually...
Select the range
Ctrl + G
Special
Blanks
Type = and press Ctrl and the Up arrow
Ctrl + Enter
Copy and Paste as values
Sub Ixcel()
Dim i As Long
For i = Cells(Rows.Count, "A").End(xlUp).Row To 2 Step -1
If Cells(i, "A") <> "" Then Cells(i, "A").Resize(4).Value = Cells(i, "A").Value
Next
End Sub
Sub Ixcel2()
Dim i As Long
For i = Cells(Rows.Count, "A").End(xlUp).Row To 2 Step -1
If Cells(i, "A") <> "" And WorksheetFunction.CountA(Cells(i, "A").Offset(1).Resize(3)) = 0 Then Cells(i, "A").Resize(4).Value = Cells(i, "A").Value
Next
End Sub