# sumifs with multiple criteria across multiple variable sheets

#### zerakh

##### New Member
I've been working with my file, and found a formula that could work for me...Unfortunately, i have variable sheets that may change names. I've also noticed because of this, the formula keeps breaking (the reference no longer is there) and the workbook takes longer than I've ever had before.

my goal is to take the sum of all sheets (trade & job) and then I will compare it to the totals/invoice page where I have placed the amount of hours/money per trade that I am allowed.

Excel Formula:
``=SUMPRODUCT(SUMIFS(INDIRECT("'"&Worksheet&"'!W:W"),INDIRECT("'"&Worksheet&"'!B:B"),\$E23,INDIRECT("'"&Worksheet&"'!C:C"),\$F23))``

I used the following source(s):
How to Use the SUMIF Function Across Multiple Sheets | Excelchat

I've only been able to get the code to work on a local sheet level, which requires me to add some hidden columns, but it doesn't always calculate correctly (mostly on the multiple sheets)

could you assist?

also, many of my formulas/vba i've patched together from multiple sources- currently they work for what I need, but if you have any suggestions on how to make it more efficient, I'd be grateful.

thank you.

http://www.omilotdesigns.com/excel/timecards_forum.xlsm

### Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

#### zerakh

##### New Member
anyone have an idea how to do this work with non-static varying tab names or even how to make it quicker without errors?

#### Fluff

##### MrExcel MVP, Moderator
Cross posted sumifs with multiple criteria across multiple variable sheets

While we do allow Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules). This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered elsewhere.

#### zerakh

##### New Member
I just posted to the other site this morning and didnt get a chance to post here that i did so.

thanks,

Replies
13
Views
252
Replies
2
Views
151
Replies
1
Views
111
Replies
3
Views
131
Replies
1
Views
110