Using iferror with sumproduct for a dynamic 3Dsum

crocco

Board Regular
Joined
Jan 28, 2010
Messages
142
I’m trying to do something like an advanced 3DSum where instead of having all the tabs lined up next to eachother, it refers to a range on the sheet for which tabs to sum. I get pretty close with this:

=sumproduct(sum(indirect$AN$10:$AN$15&”!”&cell(“address”,c46))))

Where $AN$10:$AN$15 has a list of tabs, and I’m totalling cell c46 on every tab.

The issue is that if that tab name range has a blank cell or an unrecognised tab, the whole formula errors out. How to I get the error to resolve to zero for individual items in the array rather than the whole formula?

Thanks!
 
Last edited:

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Try the following formula, which needs to be confirmed with CONTROL+SHIFT+ENTER, not just ENTER...

=SUM(IFERROR(N(INDIRECT("'"&$AN$10:$AN$15&"'!C46")),0))

Hope this helps!
 
Upvote 0
I’m pretty sure this formula won’t be dynamic, ie if I drag it then it won’t change the cell it’s adding. My original formula worked if I dragged it. The issue is that the iferror isn’t working for a single item in the array.
 
Upvote 0
In that case, you can use the Cell function, as per your original post...

=SUM(IFERROR(N(INDIRECT("'"&$AN$10:$AN$15&"'!"&CELL("address",C46))),0))

...confirmed with CONTROL+SHIFT+ENTER.
 
Last edited:
Upvote 0
Solution
In this case, INDIRECT returns an array of references. Therefore, in order to obtain the values from those references, we "de-reference" using the N() function.
 
Upvote 0

Forum statistics

Threads
1,215,474
Messages
6,125,024
Members
449,204
Latest member
LKN2GO

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