Copying Indirect formula so rows increment

Peter Davison

Active Member
Joined
Jun 4, 2020
Messages
435
Office Version
  1. 365
Platform
  1. Windows
I have the following code using indirect so it can look at the sheet name from cell (DK$34)

=SUMIFS(INDIRECT("'[MasterData.xlsm]"&DK$34&"'!$AQ10:$MMZ10"),INDIRECT("'[MasterData.xlsm]"&DK$34&"'!$AQ$3:$MMZ$3"),"="&DK$33,INDIRECT("'[MasterData.xlsm]"&DK$34&"'!$AQ$1:$MMZ$1"),"="&$N$2)/DK$32

I need to be able to copy this formula down so the $AQ10:$MMZ10 increments by 1 each time.

I've looked at offsets and rows and row but still can't work it out.
Any help would be appreciated
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Hi Peter Davison,

Try replacing the string with
Excel Formula:
CELL("address",$AQ10:$MMZ10)
 
Upvote 0
Which part of this address does the above replace?
"'[MasterData.xlsm]"&DK$34&"'!$AQ10:$MMZ10"
 
Upvote 0
Excel Formula:
"'[MasterData.xlsm]"&DK$34&"'!"&CELL("address",$AQ10:$MMZ10)
 
Upvote 0
I changed it to this and it just gives me a #value result

=SUMIFS(INDIRECT("'[MasterData.xlsm]"&DK$34&"'!"&CELL("address",$AQ10:$MMZ10)),INDIRECT("'[MasterData.xlsm]"&DK$34&"'!$AQ$3:$MMZ$3"),"="&DK$33,INDIRECT("'[MasterData.xlsm]"&DK$34&"'!$AQ$1:$MMZ$1"),"="&$N$2)/DK$32

Any thoughts why

In its pre code -
=SUMIFS(INDIRECT("'[MasterData.xlsm]"&DK$34&"'!$AQ10:$MMZ10"),INDIRECT("'[MasterData.xlsm]"&DK$34&"'!$AQ$3:$MMZ$3"),"="&DK$33,INDIRECT("'[MasterData.xlsm]"&DK$34&"'!$AQ$1:$MMZ$1"),"="&$N$2)/DK$32

The result is 4372 which is correct.

Appreciate your help
 
Upvote 0
Try this

MasterData.xlsm
ABC
9OriginalRelative Row
1043724372
1143724919
1243725465
1343726012
1443726558
Sheet3
Cell Formulas
RangeFormula
A10:A14A10=SUMIFS(INDIRECT("'[MasterData.xlsm]"&DK$34&"'!$AQ10:$MMZ10"),INDIRECT("'[MasterData.xlsm]"&DK$34&"'!$AQ$3:$MMZ$3"),"="&DK$33,INDIRECT("'[MasterData.xlsm]"&DK$34&"'!$AQ$1:$MMZ$1"),"="&$N$2)/DK$32
C10:C14C10=SUMIFS(INDIRECT("'[MasterData.xlsm]"&DK$34&"'!"&CELL("address",$AQ10)&":"&CELL("address",$MMZ10)),INDIRECT("'[MasterData.xlsm]"&DK$34&"'!$AQ$3:$MMZ$3"),"="&DK$33,INDIRECT("'[MasterData.xlsm]"&DK$34&"'!$AQ$1:$MMZ$1"),"="&$N$2)/DK$32
 
Upvote 0
Solution

Forum statistics

Threads
1,214,985
Messages
6,122,605
Members
449,089
Latest member
Motoracer88

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