Average in Multiple Sheets

Paiwand

New Member
Joined
Apr 14, 2018
Messages
7
Hello Dear.

I have an workbook which is consist of 13 sheets, starts form (Jan,Feb,Mar,...Dec) plus (Annual), at the Annual Sheet i would like to getting an cell's average which is exist in all sheets and its (D17) the average should exclude and unconsidered zero and blank. i have used the below formula but it doesn't work.

=AVERAGEIFS(Jan!D17;Feb!D17;Mar!D17;Apr!D17;May!D17;Jun!D17;Jul!D17;Aug!D17;Sep!D17;Oct!D17;Nov!D17;Dec!D17;"0%")

Please your kind help.

Best regards.
 
Although I generally know how to avoid such errors, unfortunately in this case, I can't do that as the sheet is password protected.

I see. We have to switch to a different method.

Create a range which houses the names of the relevant sheets. Select this range and name the selection SheetList.

Now invoke:

=SUMPRODUCT(SUMIFS(INDIRECT("'"&SheetList&"'!C10:C33"),INDIRECT("'"&SheetList&"'!C10:C33"),{"<0",">0"}))/SUMPRODUCT(COUNTIFS(INDIRECT("'"&SheetList&"'!C10:C33"),{"<0",">0"}))
 
Upvote 0

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Thank you Aladin, I'll give it a try.
Problem I think I will have and that is why I used the First/Last approach is that if a worksheet does not exist in that SheetList, then I will get an error. I am using a software system that writes from a template that adds a new worksheet each day and records hourly data on that worksheet. The tab names are 01 thorough 31.
 
Upvote 0
Thank you Aladin, I'll give it a try.
Problem I think I will have and that is why I used the First/Last approach is that if a worksheet does not exist in that SheetList, then I will get an error. I am using a software system that writes from a template that adds a new worksheet each day and records hourly data on that worksheet. The tab names are 01 thorough 31.

See if you can manage to use the technique described in post #22 of:

https://www.mrexcel.com/forum/excel-questions/119020-sumif-multiple-sheets-2.html

which allows you to dynamically construct the SheetList.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,324
Members
452,635
Latest member
laura12345

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