Sum "A2" different sheets if "A1" on these sheets equals "A1" on this total sheet

Kamolga

Well-known Member
Joined
Jan 28, 2015
Messages
1,185
Hi,

I struggle with a file of mine: I have one sheet per alley (all similar) for a store. I want to sum up each department on its specif sheet and "A1" has the name of the department on every sheets).

If I create a sheet "Fruits & veg" with its name in "A1" too, what should I do to have all "A2" added if its belongs to this department?

I tried =sumif(sheet1:sheet99!A1;A1;sheet1:sheet99!A2) but I got a value error. I guess range has to be on a single sheet.

Note that I have a macro creating the sheets of the alleys and could therefore use a macro to sum up the department if I knew how. Unfortunately the name of the alleys change for each store (the macro use a list of alleys to create the sheets) but I should be abble to sort it out if I could understand how to ask excel to sum A2 of the sheets if their A1 is similar to A1 of my active sheet.

Thank you in advance for your input.

Kamolga
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

Forum statistics

Threads
1,223,227
Messages
6,170,849
Members
452,361
Latest member
d3ad3y3

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