the below code works very well, but if there isn't any blank cells it gives a error, any idea as how to modif the same.
Sub Fill_Blanks()
With Range("M5:M" & Range("J" & Rows.Count).End(xlUp).Row)
.SpecialCells(xlBlanks).FormulaR1C1 = "=R[-1]C"
.Value = .Value
End With
End Sub