cjvenables
Board Regular
- Joined
- Aug 2, 2011
- Messages
- 65
Hello,
I have some code that will put formulas into the following ranges in different columns. Since the columns aren't next to each other, I'm looking for some code to autofill them in the last row of each column, aligning with column A.
I tried to make the code an autofill, but I'm getting an error. Hope someone can help me out.
Thanks!
I have some code that will put formulas into the following ranges in different columns. Since the columns aren't next to each other, I'm looking for some code to autofill them in the last row of each column, aligning with column A.
Code:
Range("F4,I4,L4,O4,R4,U4,X4,AA4,AD4,AG4,AJ4,AM4").FormulaR1C1 = "=RC[-2]-RC[-1]"
I tried to make the code an autofill, but I'm getting an error. Hope someone can help me out.
Code:
Range("F4,I4,L4,O4,R4,U4,X4,AA4,AD4,AG4,AJ4,AM4").AutoFill Destination:=Range("F4:F,I4:I,L4:L,O4:O,R4:R,U4:U,X4:X,AA4:AA,AD4:AD,AG4:AG,AJ4:AJ,AM4:AM" & Range("A" & Rows.Count).End(xlUp).Row)
Thanks!