INDIRECT in SUMPRODUCT for sheets with different name

shuffleyourfeet

New Member
Joined
Apr 12, 2013
Messages
6
Hello,

I work on four sheets on excel with the same layout. Each sheet contains two columns, A: users and B: country of origin. I created these 4 sheets in order to categorize the users according to role (eg: Musicians, Public, Music Sites etc).

I also created a 5th sheet to do my analytics. For example I wanted to count how many people, of all the users, came from Germany. Therefore i used an indirect formula to import data from all 4 sheets. This formula was:

=SUMPRODUCT(COUNTIF(INDIRECT("Sheet"&{1,2,3,4}&"!B1:B40"),"germany"))

It worked. Now, in order to make it more presentable I renamed the sheets according to role. So now

Sheet1=Musicians
Sheet2=Public

and so on. Which formula should I use in order to get the same results after this alteration?
The abovementioned formula doesn't work. I tried different combinations but still got errors. Any suggestions?

Thanks!
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

Forum statistics

Threads
1,215,537
Messages
6,125,386
Members
449,221
Latest member
DFCarter

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