Hello,
I am trying to copy about 100 formulas from a row, and then paste them 2 rows below where I copied, and then have it filldown til the last row.The issue is that the 100 formulas are not in the immediate columns, it can go A4 - F4, and then M4-N4, P4-T4... and so on.
Here is what I have started thus far:
I was trying to get help so that instead of it saying Range(B4), it would go to the first item in the array, then do the paste for 2nd array Range(b6), and then filldown based off 2nd array Range(b6)
I appreciate any help someone can give,
Zach
I am trying to copy about 100 formulas from a row, and then paste them 2 rows below where I copied, and then have it filldown til the last row.The issue is that the 100 formulas are not in the immediate columns, it can go A4 - F4, and then M4-N4, P4-T4... and so on.
Here is what I have started thus far:
Code:
Sub Paste_Data()
Dim lastrowDB As Long, lastrow As Long
Dim arr1, arr2, i As Integer
With Sheets("AssetPlanQry")
lastrowDB = .Cells(.Rows.Count, "A").End(xlUp).Row + 1
End With
arr1 = Array("B4", "F4", "L4", "M4", "N4", "O4", "P4", "Q4", "R4", "S4", "T4", "V4", "W4", "X4", "Y4", "Z4", "AA4", "AB4", "AC4", "AD4", "AE4")
arr2 = Array("B6", "F6", "L6", "M6", "N6", "O6", "P6", "Q6", "R6", "S6", "T6", "V6", "W6", "X6", "Y6", "Z6", "AA6", "AB6", "AC6", "AD6", "AE6")
)
For i = LBound(arr1) To UBound(arr1)
With Sheets("AssetPLanQry")
Range("B4").Copy
Range("B6").PasteSpecial
Range("B6:B" & lastrow).FillDown
End Sub
I was trying to get help so that instead of it saying Range(B4), it would go to the first item in the array, then do the paste for 2nd array Range(b6), and then filldown based off 2nd array Range(b6)
I appreciate any help someone can give,
Zach