How to fill blank cells with the last preceding non-blank cell ?
For example, I have this two-columns sheet:
A
abc
dce
fds
B
kj
Select the column, go to Edit > Go To > Special > Blanks, type = in the formula bars, hit the up arrow then Ctrl+Enter. you should now have the cells fill with the values above
Select the range where you want to fill the blank cells,
Then click on Developer Tab -> Visual Basic -> Insert -> Module
Then paste the code in the Module, and click on run:
Code:
Sub Fill_Blank_Cells()
Selection.SpecialCells(xlCellTypeBlanks).Select
Selection.FormulaR1C1 = "=R[-1]C"
End Sub
As @Jerry rightfully pointed out, make sure to copy-paste special the values in order to remove the formulas behind your filled column. This will prevent any undesirable results later!