Copy formula and paste into next cell down - updates references of formula

emz07

New Member
Joined
Oct 28, 2020
Messages
6
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Hello,

Please could someone help. I have no idea how to edit it to get it to do what I want. If I fill down the formulas, the offset won't work because there is already numbers in the V column

Here is my(someone wrote this for me originally) code:

Sub RectangleRoundedCorners2_Click()
Dim rng As Range
Set rng = Range("V" & Cells(Rows.Count, "V").End(xlUp).Row)
rng.Offset(1, 0) = [K15]
rng.Offset(1, 1) = [J2]
rng.Offset(1, 2) = [J3]
rng.Offset(2, 0) = [V1].Copy
rng.Offset(2, 0) = [V1].pastespecial xlpasteformulas
End Sub

It won't copy the formula V1, I want it to act like FILL SERIES which updatee the cell references when I copy the formula.

Cell Formulas
RangeFormula
Z2:Z34Z2=V2
AA2:AA34AA2=IFERROR((Z2*$AB$1)+(Z2)," ")
Z35:AA35Z35=SUM(Z2:Z34)
V1:V2V1=IF(Y1="Y",V1,IF(W1=0," ",(IF($J$1="Yes",IF(W1="Q",(INDEX($P$1:$S$439,MATCH(X1,$P:$P,0),2)),IF(W1="H",(INDEX($P$1:$S$439,MATCH(X1,$P:$P,0),3)),IF(W1="F",(INDEX($P$1:$S$439,MATCH(X1,$P:$P,0),4))))),IF($J$1="No",IF(W1="Q",(INDEX($A$1:$D$593,MATCH(X1,$A:$A,0),2)),IF(W1="H",(INDEX($A$1:$D$593,MATCH(X1,$A:$A,0),3)),IF(W1="F",(INDEX($A$1:$D$593,MATCH(X1,$A:$A,0),4))))))))))
V3V3=IF(Y3="Y",V3,IF(W3=0," ",(IF($J$1="Yes",IF(W3="Q",(INDEX($P$1:$S$439,MATCH(X3,$P:$P,0),2)),IF(W3="H",(INDEX($P$1:$S$439,MATCH(X3,$P:$P,0),3)),IF(W3="F",(INDEX($P$1:$S$439,MATCH(X3,$P:$P,0),4))))),IF($J$1="No",IF(W3="Q",(INDEX(A2:$D$593,MATCH(X3,$A:$A,0),2)),IF(W3="H",(INDEX(A2:$D$593,MATCH(X3,$A:$A,0),3)),IF(W3="F",(INDEX(A2:$D$593,MATCH(X3,$A:$A,0),4))))))))))
V5V5=IF(Y1="Y",V1,IF(W1=0," ",(IF($J$1="Yes",IF(W1="Q",(INDEX($P$1:$S$439,MATCH(X1,$P:$P,0),2)),IF(W1="H",(INDEX($P$1:$S$439,MATCH(X1,$P:$P,0),3)),IF(W1="F",(INDEX($P$1:$S$439,MATCH(X1,$P:$P,0),4))))),IF($J$1="No",IF(W1="Q",(INDEX($A$1:$D$593,MATCH(X1,$A:$A,0),2)),IF(W1="H",(INDEX($A$1:$D$593,MATCH(X1,$A:$A,0),3)),IF(W1="F",(INDEX($A$1:$D$593,MATCH(X1,$A:$A,0),4))))))))))
Named Ranges
NameRefers ToCells
_FilterDatabase=Checker!$A$1:$D$1V5, V1:V3
 

Attachments

  • Paste Special Formula.JPG
    Paste Special Formula.JPG
    49.9 KB · Views: 11

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
How about
VBA Code:
rng.Offset(2, 0).FormulaR1C1 = [V1].FormulaR1C1
 
Upvote 0
Solution
Thank you for you reply, but it did not work :(
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,525
Messages
6,120,052
Members
448,940
Latest member
mdusw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top