adding indirect values

uk747

Well-known Member
Joined
Jul 20, 2011
Messages
832
Office Version
  1. 365
Platform
  1. Windows
currently have
=INDIRECT("'"&A1&"'!"&"C10")

which shows the sheet name in A1 and the value in C10
If i wanted to add C10+C20+c32 whats the easiest way or if a range i.e. C10:C16

DO i have to use =INDIRECT("'"&A1&"'!"&"C10") +INDIRECT("'"&A1&"'!"&"C10")+=INDIRECT("'"&A1&"'!"&"C32")
 
Try

=SUMPRODUCT(SUBTOTAL(109,INDIRECT("'"&A1:G1&"'!C1:C16")))

There cannot be any blanks or invalid sheet names in A1:G1


And if those are still dates that correspond to sheets named 1 May etc.
=SUMPRODUCT(SUBTOTAL(109,INDIRECT("'"&TEXT(A1:B1,"d mmm")&"'!C1:C10")))
 
Upvote 0

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Try

=SUMPRODUCT(SUBTOTAL(109,INDIRECT("'"&A1:G1&"'!C1:C16")))

There cannot be any blanks or invalid sheet names in A1:G1


And if those are still dates that correspond to sheets named 1 May etc.
=SUMPRODUCT(SUBTOTAL(109,INDIRECT("'"&TEXT(A1:B1,"d mmm")&"'!C1:C10")))

never even heard of the subtotal never mind the 109 part. is the subtotal applicable if you want to add a range (C1:C10) or a Cell C10.

or is subtotal used/needed when grouping/adding consecutive sheets


normally its just =SUM('4 May:30 May'!A1) so thought the indirect might be along those lines
 
Last edited:
Upvote 0
The subtotal is there to create an array of C1:C10 from each sheet named in A1:G1.
109 is the option in subtotal to make it do SUM (it can also do Average, Product, Count etc..)

Yes, it will work for either single cell C10 or a range C1:C10
 
Upvote 0
ok thanks, so no other way other than subtotal to make indirect equal =SUM('4 May:30 May'!A1)
 
Upvote 0

Forum statistics

Threads
1,215,427
Messages
6,124,830
Members
449,190
Latest member
rscraig11

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