Autofill formula with dynamic range, move formulas between columns

Copper Contributor

Hi,

 

I am creating a Macro to drag the information I have in one column to the next one. The range needs to be dynamic because I will be moving month over month data. I have created this but I am no able to find the error. The error is in the last row

 

Sub DragTry1()

 

Dim r1 As Range, r2 As Range

Set r1 = Application.InputBox(Prompt:="Please select source range", Type:=8)
Sheets("FRM43 Table").Select
Set r2 = Application.InputBox(Prompt:="Please select destination cell", Type:=8)

r1.Copy
Selection.AutoFill Destination:=r2, Type:=xlFillDefault

 

End Sub

 

 

 

 

 

1 Reply

@AydeeDiaz 

Could you attach a small sample workbook demonstrating the problem (without sensitive data), or if that is not possible, make it available through OneDrive, Google Drive, Dropbox or similar?