REF error with INDIRECT formula

colinheslop1984

Board Regular
Joined
Oct 14, 2016
Messages
129
Office Version
  1. 2016
Hi

Hoping someone can help, I need to gather data from multiple worksheets on multiple workbooks

The below gives me #REF error

=SUMPRODUCT(INDIRECT("'"&$C$5&"'[JAMIE SHEET METRO.xlsx]!'""'c$12:c$25"),$C$9:$C$22,INDIRECT("'"&$C$5&"'[JAMIE SHEET METRO.xlsx]!J$12:J$25"))

Cell C5 refers to tab names which can be changed using a drop down list
c12:c25 is criteria
j12:j25 is data needed

Is my formula structured wrong or is a different one needed?

Any feedback and possible suggestions would be much appreciated
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Workbooks come before sheet names not the other way round as you have it.
 
Upvote 0
=SUMIF(INDIRECT("'"&$C$5&"[JAMIE SHEET METRO.xlsx]'!'""'c$12:c$25"),$C$9:$C$22,INDIRECT("'"&$C$5&"[JAMIE SHEET METRO.xlsx]'!J$12:J$25"))

Still get the same error, have I put in in the right place amongst those quotation marks?

Would be a big help if you could rewrite for me, im not that savvy with all this

Thanks for help !
 
Last edited:
Upvote 0
Do the sumif without the indirect and paste that formula here. Ill rewrite it for you.
 
Upvote 0
Hold on ive just read it again. What do you mean c12:c25 is criteria?
 
Upvote 0
This has been cross posted on at least one other site
While we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules).
This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.

Please supply links to all other sites where you have asked this question.
 
Upvote 0
Here is a valid sumif using indirect:

=SUMIF(INDIRECT("'[JAMIE SHEET METRO.xlsx]"&$C$5&"'!C$12:C$25"),$C$9,INDIRECT("'[JAMIE SHEET METRO.xlsx]"&$C$5&"'!J$12:J$25"))

This is going to sum the numbers in range J12:J25 of the sheet named in cell C5 of the Jamie workbook where the corresponding cells in C12:C25 equal whatever is in C9.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

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