Average of Weekly data to exclude 0

Rastamania

New Member
Joined
May 24, 2019
Messages
2
A
B
C
D
E
F
1
Week numbers
Calender week
index number
Date
production moisture
average moisture
2
1
1
43466
1-Jan-2019
8.54
=AVERAGEIF($A$2:$A$10,B2,$E$2:$E$10)
3
1
2
43467
2-Jan-2019
8.46
4
1
3
43468
3-Jan-2019
8.41
5
1
4
43469
4-Jan-2019
6
1
5
43470
5-Jan-2019
8.39
7
1
6
43471
6-Jan-2019
8
2
7
43472
7-Jan-2019
8.38
9
2
8
43473
8-Jan-2019
8.42
10
2
9
43474
9-Jan-2019
8.43

<tbody>
</tbody>
Hi MrExcel,
I have been working on copper production moisture calculations and would like to pick up average moisture for weekly production by using this formula;
=AVERAGEIF($A$2:$A$10,B2,$E$2:$E$10)
The formula gives me the average moisture for a week (7 production days) but when it comes to 0 number, it brings down the average low. Please help me with the formula I use above to exclude 0.

I have tried, ">0" in the formula as =AVERAGEIF($A$2:$A$10,B2,$E$2:$E$10,">0") but it gives me error.

Please rescue me out from this.

Thank you,
Rastamania.
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Hi. In your example that you have provided the blanks will be ignored by the AVERAGEIF so will be giving you the correct result. If you actually have 0 in those cells then use AVERAGEIFS rather than AVERAGEIF. You can then add the 2nd criteria of >0.

=AVERAGEIFS(E2:E10,A2:A10,B2,E2:E10,">0")
 
Upvote 0
Hi. In your example that you have provided the blanks will be ignored by the AVERAGEIF so will be giving you the correct result. If you actually have 0 in those cells then use AVERAGEIFS rather than AVERAGEIF. You can then add the 2nd criteria of >0.

=AVERAGEIFS(E2:E10,A2:A10,B2,E2:E10,">0")


++++++++++++

Thank you very much for the help.
This has really help me out from my head ach.

Really appreciate your help.

Once more, thank you very much.
 
Upvote 0

Forum statistics

Threads
1,214,805
Messages
6,121,656
Members
449,045
Latest member
Marcus05

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