Hi all,
First post and new to VBA (pretty cool so far to automate boring reports).
I have a column with content in various cells, and some blank cells in the middle.
I have this code, to copy cell content above to all blank cells below.
But I only want to copy until the last row of another column (for example, if column A has rows filled until 100, I only want this to happen until row 100).
Can you please help me?
Cheers
First post and new to VBA (pretty cool so far to automate boring reports).
I have a column with content in various cells, and some blank cells in the middle.
I have this code, to copy cell content above to all blank cells below.
But I only want to copy until the last row of another column (for example, if column A has rows filled until 100, I only want this to happen until row 100).
Can you please help me?
Cheers
VBA Code:
Sub copyToBlanks2()
With Range("AG:AG")
.SpecialCells(xlCellTypeBlanks).FormulaR1C1 = "=R[-1]C"
.Value = .Value
End With
End Sub