INDIRECT SUM WITH SHEET NAMES

occy

New Member
Joined
Jul 15, 2003
Messages
13
I am trying to sum a particular cell across a range of worksheets. My formula is:

=SUM(INDIRECT(K4&":"&K5&"!"&"J60"))

Where K4 contains the name of the first worksheet and K5 contains the name of the last worksheet in the range I want to sum. J60 is the cell I want to sum.

I get the dreaded #ref! result. Help would be much appreciated.

Thanks
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Sorry i tried the formula, it is not working. getting 0 value

You are saying that:

{=AVERAGE(IF((MATCH(Sheets,Sheets,0)>=$C$3)*(MATCH(Sheets,Sheets,0)<=$C$4),SUBTOTAL(1,INDIRECT("'"&Sheets&"'!C5))))}

works, but

{=AVERAGE(IF((MATCH(Sheets,Sheets,0)>=$C$3)*(MATCH(Sheets,Sheets,0)<=$C$4),SUBTOTAL(1,INDIRECT("'"&Sheets&"'!"&CELL("address",C5)))))}

does not while it should when copied down/across?
 
Upvote 0
You are saying that:

{=AVERAGE(IF((MATCH(Sheets,Sheets,0)>=$C$3)*(MATCH(Sheets,Sheets,0)<=$C$4),SUBTOTAL(1,INDIRECT("'"&Sheets&"'!C5))))}

works, but

{=AVERAGE(IF((MATCH(Sheets,Sheets,0)>=$C$3)*(MATCH(Sheets,Sheets,0)<=$C$4),SUBTOTAL(1,INDIRECT("'"&Sheets&"'!"&CELL("address",C5)))))}

does not while it should when copied down/across?


SUBTOTAL(1,INDIRECT("'"&Sheets&"'!C5) it does work in c5 provided it contains the the cell of going to sum up in different sheet and while the second one it returns #DIV /0
 
Upvote 0
SUBTOTAL(1,INDIRECT("'"&Sheets&"'!C5) it does work in c5 provided it contains the the cell of going to sum up in different sheet and while the second one it returns #DIV /0

cell c5 should be the cell reference in which the amount in c5 in various sheet should be total not the reference cell such as A1 as indirect in cell c5
 
Upvote 0
in the second with address c5 if i highlight the formula and click F9 it shows the total but if i control shift enter it show 0 amount
 
Upvote 0
if i evaluate the formula its say sum(false,12,12,false,false) that's why it becomes zero but using f9 computes 24
 
Upvote 0
if i evaluate the formula its say sum(false,12,12,false,false) that's why it becomes zero but using f9 computes 24

Just to make sure:

Are we evaluating

{=AVERAGE(IF((MATCH(Sheets,Sheets,0)>=$C$3)*(MATCH(Sheets,Sheets,0)<=$C$4),IFERROR(SUBTOTAL(1,INDIRECT("'"&Sheets&"'!"&$C$5)),"")))}

where C5 houses a range specification like A1:B1?
 
Upvote 0
Just to make sure:

Are we evaluating

{=AVERAGE(IF((MATCH(Sheets,Sheets,0)>=$C$3)*(MATCH(Sheets,Sheets,0)<=$C$4),IFERROR(SUBTOTAL(1,INDIRECT("'"&Sheets&"'!"&$C$5)),"")))}

where C5 houses a range specification like A1:B1?

Nope. C5 houses the value not the range
 
Upvote 0

Forum statistics

Threads
1,223,912
Messages
6,175,340
Members
452,637
Latest member
Ezio2866

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