search a code in multiple sheets and return the sum of value of that code

seeker123

Board Regular
Joined
Oct 8, 2011
Messages
84
Hi everyone,

I have about 30 sheets that contain tables like below
CodeValue
020112000
020121400
020214000

<tbody>
</tbody>
...

I have a summary table containing all codes in a different workbook .what I want to have is the sum of values of each code in the summary table.
please bear in mind that they are on several sheets and I want the sum of them.(All codes are in column a and all values are in column E)
for example
CodeValue
020133400

<tbody>
</tbody>

Thanks a lot in advance
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
If you have a list of the sheets, you can try this:

ABCDEFGHIJ
1CodeValueSheetsCodeMulti-sheet sumif
22010.5Sheet420138956.1
32010.6Sheet52025844.7
42020.7Sheet62032222.8
52030.8

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet6

Array Formulas
CellFormula
J2{=SUM(SUMIF(INDIRECT($H$2:$H$4&"!A:A"),I2,INDIRECT($H$2:$H$4&"!E:E")))}

<thead>
</thead><tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>
 
Upvote 0
I would suggest:
- adding single quotes before and after the $H$2:$H$4 (...INDIRECT("'"&$H$2:$H$4&"'!A:A")...)
- using SUMPRODUCT instead of the SUM to avoid CSE
 
Upvote 0

Forum statistics

Threads
1,221,442
Messages
6,159,905
Members
451,601
Latest member
terrynelson55

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