How to sum different cells across multiple sheets based on the criteria on google sheets

emr

New Member
Joined
Mar 29, 2020
Messages
1
Platform
  1. MacOS
I have a google sheets spreadsheet with multiple sheets for different clients. On the overview sheet I want to pull data for the specific month i.e March and specific column header i.e Sales from each of the clients sheets if that data appears.

The data isn't in the same cell across each sheet because some clients began in different months.
I have also manually written a list of the clients names that match the tab names so that I can reference them more easily.

The formula I am using at the moment means that I have to manually sum each statement, is there a way to use one formula and reference a range of sheets rather then do each sheet individually on google sheets?

A snippet of my formula at the moment is the below. In reality it is much longer as I have at least 20 sheet names to reference.

=sum(iferror(indirect("'"&$A$29&"'!" &Address(match($A10,Indirect("'"&$A$29&"'!$A:$A"),0),match(C$2,Indirect("'"&$A$29&"'!$A$2:$af$2"),0))),0),iferror(indirect("'"&$A$30&"'!" &Address(match($A10,Indirect("'"&$A$30&"'!$A:$A"),0),match(C$2,Indirect("'"&$A$30&"'!$A$2:$af$2"),0))),0),iferror(indirect("'"&$A$31&"'!" &Address(match($A10,Indirect("'"&$A$31&"'!$A:$A"),0),match(C$2,Indirect("'"&$A$31&"'!$A$2:$af$2"),0))),0),iferror(indirect("'"&$A$32&"'!" &Address(match($A10,Indirect("'"&$A$32&"'!$A:$A"),0),match(C$2,Indirect("'"&$A$32&"'!$A$2:$af$2"),0))),0))

P.S. I have tried sumproduct(sumif(indirect) but didn't manage to get it to work because I was referencing a range and I am not sure if google sheets allows you to?
Any help would be much appreciated and just to be clear I am using google sheets not excel.

Thank you!
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

Watch MrExcel Video

Forum statistics

Threads
1,129,557
Messages
5,637,043
Members
416,955
Latest member
Gohar hussain

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
Top