Hi,
What I would like to do is alter this code so it only fills the empty cells from the last non empty cell in col D up to the next non empty cell and then stops there.
I hope this makes sense and any help would be appreciated.
Thanks
Dan
What I would like to do is alter this code so it only fills the empty cells from the last non empty cell in col D up to the next non empty cell and then stops there.
VBA Code:
Sub FillBlanks()
Dim Rng As Range, RngBlanks As Range
Set Rng = Range("D3", Range("F" & Rows.Count).End(xlUp))
On Error Resume Next
Set RngBlanks = Rng.SpecialCells(xlBlanks)
On Error GoTo 0
If Not RngBlanks Is Nothing Then
RngBlanks.FormulaR1C1 = "=R[1]C"
Rng.Value = Rng.Value
End If
End Sub
I hope this makes sense and any help would be appreciated.
Thanks
Dan