3d array formula

oaishm

Board Regular
Joined
Jan 30, 2009
Messages
97
I have this formula, which works quite nicely

sum('usd begin:usd end'!m10)

to automate it, I started setting local names in the spreadsheet so I can use the sheet more than once.

so sheet1!currency=sheet1!$b$3 for example.

So in sheet 1, a made this formula

=sum(indirect("'"&currency&" begin:"&currency&" end'!"&CELL("address",M10)))

alas, I have a ref error. I checked the string and it was fine. Any suggestions?
 

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)
Here's a possible workaround... First, create a table listing the currencies along with their respective sheet names. So, for example...

Code:
Let E2 contain your first currency, such as the USD, and E3:E10 the corresponding sheet names.

Let F2 contain your second currency, and F3:F10 the corresponding sheet names.

Let G2 contain your third currency, and G3:G10 the corresponding sheet names.

Then define the following...

Code:
Insert > Name > Define

Name:  SheetList

Refers to:

=INDEX(Sheet1!$E$3:$G$10,1,MATCH(Currency,Sheet1!$E$2:$G$2,0)):INDEX(Sheet1!$E$3:$G$10,MATCH(REPT("z",255),INDEX(Sheet1!$E$3:$G$10,0,MATCH(Currency,Sheet1!$E$2:$G$2,0))),MATCH(Currency,Sheet1!$E$2:$G$2,0))

**Note:  If the sheet names are numerical values, replace REPT("z",255) with 9.99999999999999E+307.

Click Ok

Then try...

Code:
=SUMPRODUCT(SUMIF(INDIRECT("'"&SheetList&"'!"&CELL("address",M10)),"<>"))

Add to your table and adjust the references, accordingly.
 
Upvote 0

Forum statistics

Threads
1,215,024
Messages
6,122,729
Members
449,093
Latest member
Mnur

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