{=AVERAGE(IF(C10:H10<>0,c10:h10)}

aka_krakur

Active Member
Joined
Jan 31, 2006
Messages
438
I am able to use {=AVERAGE(IF(C10:H10<>0,c10:h10)} to get the average between cells excluding values of zero.
I need help using this same thought process but using a running average between worksheets (still eliminating values of zero).

I've tried using:
{=AVERAGE(IF(C10:H10,'Wk 1 - P'!C10:H10<>0,(C10:H10,'Wk 1 - P'!C10:H10)))}
but I get an Excel help box that pops up stating: "You've entered too many arguments for this function....."

1. Can anyone help
2. Is it even possible to write a formula for such a task as this?
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
=SUM((C10:H10),('Wk 1 - P'!C10:H10))/COUNTIF((C10:H10),('Wk 1 - P'!C10:H10)>"0")

I used this formula as well, and when I hit enter I get a #DIV/0! in the cell.
 
Upvote 0
Try:
=SUM('Wk 1 - P'!C10:H10))/COUNTIF('Wk 1 - P'!C10:H10)>"0")

Is Your worksheet name?? "Wk 1 - P" ?


Michael
 
Upvote 0
That's one of the worksheets. I have 4 different worksheets that I need to get a running daily average on. Each worksheet is a new week of that month. So I have Wk 1 - P, Wk 2 - P, Wk 3 - P, & Wk 4 - P (the range is the same on each worksheet (C10:H10)
 
Upvote 0
Did you try my formula?
=SUM('Wk 1 - P'!C10:H10))/COUNTIF('Wk 1 - P'!C10:H10)>"0")

Michael
 
Upvote 0
right, but that will only get me the average on worksheet Wk1 - P. I need to get the average on all 4 worksheets
 
Upvote 0
Its kinda long, but it works....

=SUM(c10:h10,'Wk 1 - P'!C10:H10)/(COUNTIF('Wk 1 - P'!C10:H10,">0")+COUNTIF('Wk 1 - P'!C10:H10,"<0")+COUNTIF(c10:h10,">0")+COUNTIF(c10:h10,"<0"))
 
Upvote 0
Let A1:A4 contain a list of your sheet names...

Wk 1 - P
Wk 2 - P
Wk 3 - P
Wk 4 - P

Then, try the following formula...

=SUMPRODUCT(SUMIF(INDIRECT("'"&$A$1:$A$4&"'!C10:H10"),">0"))/SUMPRODUCT(COUNTIF(INDIRECT("'"&$A$1:$A$4&"'!C10:H10"),">0"))

Hope this helps!
 
Upvote 0

Forum statistics

Threads
1,215,479
Messages
6,125,041
Members
449,206
Latest member
Healthydogs

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