How do we know how far down to Autofill?
Should we be looking at the column to the left or to the right?
(Obviously, if you are trying to autofill column A, you won't be able to look to the left).
Dim rngFill As Range
Dim rowLast As Long, colFill As Long
Set rngFill = ActiveCell
colFill = rngFill.Column
If colFill = 1 Then
rowLast = Cells(Rows.Count, colFill + 1).End(xlUp).Row ' Look to the right if column A
Else
rowLast = Cells(Rows.Count, colFill - 1).End(xlUp).Row ' Look to the left
End If
If rowLast <= rngFill.Row Then Exit Sub
Set rngFill = Range(rngFill, Cells(rowLast, colFill))
rngFill.FillDown
End Sub