Forum Discussion
Jadepad
Jul 06, 2021Copper Contributor
Please help: Fill Blank Cells Down with VBA Marco
Hi there, I want to Fill Blank Cells Down with VBA Marco as: Sub FillBlankCellsDown() Dim xRg As Range Dim xCell As Range Dim xAddress As String On Error Resume Next xAddress = Applicatio...
- Jul 06, 2021
Please try this and see if that works for you.
Sub FillBlankCellsDown() Dim Rng As Range Dim xRg As Range On Error Resume Next On Error Resume Next Set xRg = Application.InputBox("Select a range:", "Excel", Type:=8) If xRg Is Nothing Then Exit Sub Set Rng = xRg.SpecialCells(xlCellTypeBlanks) On Error GoTo 0 If Rng Is Nothing Then Exit Sub Rng.FormulaR1C1 = "=R[-1]C" xRg.Value = xRg.Value End Sub
Jadepad
Jul 06, 2021Copper Contributor
Yes, your macro works. Awesome. Thanks very much.
Subodh_Tiwari_sktneer
Jul 06, 2021Silver Contributor
You're welcome Jadepad! Glad it worked as desired.