SUM across multiple sheets but only sheets where A5 = Internal

John Sadler

New Member
Joined
May 1, 2012
Messages
48
Hi folks,

Looking for a dynamic sort of formula that will Sum B5 in every sheet where A5 = Internal.

So there may be 20 sheets but only 3 are currently Internal but this number will increase and I don't want to manually have to update it.

I can visualise this in VBA but not a formula

Cheers folks
John
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Hi,

Sheet where you put formula is 1 or 21?

Assuming you put the formula in sheet 21 then:

=SUMPRODUCT(SUMIF(INDIRECT("Sheet"&ROW(1:20)&"!A5"),"Internal",INDIRECT("Sheet"&ROW(1:20)&"!B5")))

Obviously, the formula can be slightly modified, if you put the formula in sheet 1.
 
Last edited:
Upvote 0
Hi,

Sheet where you put formula is 1 or 21?

Assuming you put the formula in sheet 21 then:

=SUMPRODUCT(SUMIF(INDIRECT("Sheet"&ROW(1:20)&"!A5"),"Internal",INDIRECT("Sheet"&ROW(1:20)&"!B5")))

Obviously, the formula can be slightly modified, if you put the formula in sheet 1.

Thanks ... I can put the formula in Sheet 1 but there are more than 20 sheets and it grows over the course of the year (I just used 20 as an example)
Cheers John
 
Upvote 0
Sorry .. should also add that the Sheets are no longer sequential. There are 47 Sheets at the moment but there is a Sheet62. this is because over time sheets are added and deleted :-(
 
Upvote 0
Have you tested the formula?
The sheets do not have to be sequential.
If you put the formula in sheet 1 then modify the formula to include all the sheets, after sheet 1. The sheets from which those data are collected will be only those sheets that have in A5 "Internal" and in B5 a number.
 
Upvote 0
Have you tested the formula?
The sheets do not have to be sequential.
If you put the formula in sheet 1 then modify the formula to include all the sheets, after sheet 1. The sheets from which those data are collected will be only those sheets that have in A5 "Internal" and in B5 a number.

Sorry haven't tested as yet ... will have a look today and let you know
Cheers John
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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