Using DATA VALIDATION drop down to set workbook name in SUMPRODUCT

GSM1984

New Member
Joined
Feb 17, 2015
Messages
4
Hi!

I'm hoping someone can help me please.

I have a formula in excel as follows:

Code:
<code>=SUMPRODUCT(('[XXXXX.xlsx]01 04 2014'!$E$2:$E$922=C$7)+0)
</code>
I also have a data validation drop down in cell B2 that lists multiple client names.
What I'd like todo is be able to use the drop down in B2 to allow me to change the workbook being referenced in the above formula.
Something such as:
Code:
<code>=SUMPRODUCT(('[$B$2.xlsx]01 04 2014'!$E$2:$E$922=C$7)+0)
</code>
^^ This obviously doesn't work, however I hope it gives an idea what I'm trying to achieve. Ideally I'd also like to use another cell to specify the <code>01 04 2014</code> reference.
Essentially I'm trying to create something like;
Code:
<code>=SUMPRODUCT(('[$B$2.xlsx]$C$3'!$E$2:$E$922=C$7)+0)
</code>
Can anyone help please?
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Hi maybe something along =SUMPRODUCT((INDIRECT("'"&B$2&"'!$E$2:$E$922")=C$7)+0)
 
Upvote 0
Or (misread your query)
given in B2 the workbook name
given in C3 the tab name

maybe something like =SUMPRODUCT((=INDIRECT("'[" & $B$2 & "]" & $C$3 & "'!$E$2:$E$922")=C$7)+0)
 
Upvote 0
Or (misread your query)
given in B2 the workbook name
given in C3 the tab name

maybe something like =SUMPRODUCT((=INDIRECT("'[" & $B$2 & "]" & $C$3 & "'!$E$2:$E$922")=C$7)+0)


Thanks for your help, I apprecaite you taking the time to look at this.

I've tried your suggestion and sadly it produces and 'The formula you typed has contains and error' pop up :(
 
Upvote 0
Ah I removed the = from the INDIRECT function and it now accepts the formula however produces a #REF! error
 
Upvote 0
Ah I removed the = from the INDIRECT function and it now accepts the formula however produces a #REF! error

Ha, good for spotting my carelessness.
Glad you got it sorted out, equal sign was indeed a typo.
Thanks for your feedback.
 
Upvote 0

Forum statistics

Threads
1,223,162
Messages
6,170,431
Members
452,326
Latest member
johnshaji

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