Let us take an example. if you want to fill the blank cells with in range "A2:D10", make sure that you have select this range before running the macro.
Sub Fill_Blank_Cells()
Selection.SpecialCells(xlCellTypeBlanks).Select
Selection.FormulaR1C1 = "=R[-1]C"
End Sub
Please also refer to earlier post on "How to fill blank cells in excel data range with cells above it"
really healpful!!!!
ReplyDeletethanks
How about fill blank cells in excel data range without specific range. for example A2:#
ReplyDeleteIn all the cases you will need to know the range you need to fill. There may be cases where the range is dynamic and will keep changing. For such cases you can use range name in your macro instead of fixed reference.
ReplyDeletehi Yogesh.. The macro is not functioning properly if I select more cells i.e. A1 - H100000 or so.. Please give me a solution
ReplyDelete