Hello, hopefully this is a quick and easy question
Please could somebody advise how I can adjust the following macro to autofill a range of columns, not just column A? I have tried simple changes like "a1:w1" without any success. Obviously changing the Range individually works (to b1 etc) but that is tedious. We are using excel 2002. Any help would be much appreciated!
Sub fill()
Range("a1").Select
Do Until ActiveCell.Value = "stop"
If ActiveCell.Value <> "" Then
Dim a As String
a = ActiveCell.Address
ActiveCell.Offset(1, 0).Activate
Count = 1
End If
Do Until ActiveCell.Value <> ""
If ActiveCell.Value = "" Then
ActiveCell.Offset(1, 0).Activate
Count = Count + 1
End If
Loop
Dim b As String
ActiveCell.Offset(-1, 0).Activate
b = ActiveCell.Address
Range(a & ":" & b).FillDown
ActiveCell.Offset(1, 0).Activate
Loop
'
This macro basically autofills cells downwards in a column until it meets another full cell, where it copies that down to the next full cell, and so on.
Thanks in advance
Mark
Bookmarks