Reputation: 198
seems like an easy question here, but is there a code to simulate the double clicking of bottom right of fill handle? So I would have 3 cells selected, from column A, B and C; and the autofill should duplicate the values inside down all the blanks in A, B and C till there is no more blank more blanks in C.
to this:
Upvotes: 1
Views: 1342
Reputation: 96753
Give this a try:
Sub FillDown()
Dim rng As Range
Set rng = Range(Selection, Selection.End(xlDown))
Set rng = rng.Resize(rng.Rows.Count - 1, rng.Columns.Count)
rng.FillDown
End Sub
Upvotes: 4