0
votes

I've got a row containing various formulas and I wanted to copy the formulas down to a certain range.

Lets say the row of formulas is from A1:T1 and I wanted to copy the formulas down 20 rows.

The intent is if A1 has the formula Sum(U1:Z1) then A10 should have Sum(U10:Z10)

Perhaps not the best example but you get what I'm saying, the VBA equivalent of highlighting a range of cells and dragging down 20 rows.

What i've got is below:

Sub test()
Sheets("Sheet1").Range("A1:T10").Copy Sheets("Sheet1").Range("A20:T20")
End Sub

The code isn't doing what I want, what am I doing wrong?

1
Sheets("Sheet1").Range("A1:T1").Copy Sheets("Sheet1").Range("A1:T20")?BigBen
Yep. thats it...lol thanksM B

1 Answers

1
votes

To close this question: your row numbers are a bit off:

Sheets("Sheet1").Range("A1:T1").Copy Sheets("Sheet1").Range("A1:T20")