Non static array formula

Tjeerd

New Member
Joined
Aug 9, 2016
Messages
2
Hi Everyone.

I am writing a code to update a workbook. Part of this is to drag down formulas to the extend it reaches the bottom of a refreshed pivot table (used column E). I have used:

With Sheets("Circuits")
lastRow = .Cells(.Rows.Count, "E").End(xlUp).Row

.Range("h11:h" & lastRow).FormulaArray = _
"=IF(AND($F11=""0"",$D11=""""),"""",IFERROR(INDEX(DATA!AF:AF,MATCH(1,(DATA!G:G=$F11)*(DATA!Q:Q=$D11),0),1),""""))"
End With

Now I know that using this setup I will get a static drill down of my formula, I am hoping someone can teach me how to change this in to non-static

Thanks in advance!
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
You'll need to first enter the formula in Range("H11"). Then you'll need to copy and paste the formulas to Range("H12:H" & lastRow)...

Code:
Range("H11").FormulaArray = " . . . "

Range("H11").Copy
Range("H12:H" & lastrow).PasteSpecial Paste:=xlPasteFormulas
 
Last edited:
Upvote 0
Hi Dominic!

Thanks a lot for your help it worked!
Only thing I changed was "Range" into ".Range"

:)

Best regards,

Tjeerd
 
Upvote 0

Forum statistics

Threads
1,216,122
Messages
6,128,952
Members
449,480
Latest member
yesitisasport

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