AverageIfs Complexity

mrwiley

Board Regular
Joined
Sep 10, 2012
Messages
59
Good afternoon,

I have a problem... I am hoping someone can help.

I have a spread-sheet which contains various codes in Column C (30,40,90,95,99) and value of percentage in Column G.

I want to take the values 30, 40 and average all amounts including 0% and I also want to include values 90, 95, 99 but with a value greater than 0% (not include 0%)

Currently I have it calculating everything greater than 0%

=AVERAGEIFS($G$2:$G$109,$C$2:$C$109,"<>30",$G$2:$G$109,">0") <<this works but omits any 0%

A B
WLKITLWLDOCO WASRSTWADRQJWLUORG WLSOQS PERCENTAGE
Part 1434671 9907/31/18630630100.00%
1434672 9908/01/18900900100.00%
1434673 9008/02/18630630100.00%

<colgroup><col span="6"><col></colgroup><tbody>
</tbody>

Basically when I average this I filter anything containing a 90, 95, 99 and delete all 0% then average like normal... want something faster.

Thank you
 
1435542997/31/201820242024100.00%
1435543998/1/201824182418100.00%
1435544998/2/201817201732100.70%
1429008408/3/201818001800100.00%
1435545408/6/201810301030100.00%
1435546998/7/20181784253068.18%
1435547408/8/201815001594103.73%
1442957998/8/20181250
1435548408/9/20181784174998.04%
1435549408/10/20181784243373.62%
1435550408/13/2018150542928.50%
1435551308/14/2018178400.00%
1435552308/15/2018150500.00%
1435553908/16/201817840
1435554958/17/201817840
1435555308/20/2018351000.00%
67.14%

<tbody>
</tbody>

Control+shift+enter, not just enter:

=AVERAGE(IF(C2:C17<>IF(ISNUMBER(MATCH(C2:C17,{90,95,99},0)),IF(G2:G17=0,C2:C17)),G2:G17))
 
Upvote 0

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
It worked, had to change formula to calculate % below 0% - thanks so much!


a​
b​
c​
d​
e​
f​
g​
1​
2​
1435542​
99​
7/31/2018​
2024​
2024​
100.00%​
3​
1435543​
99​
8/1/2018​
2418​
2418​
100.00%​
4​
1435544​
99​
8/2/2018​
1720​
1732​
100.70%​
5​
1429008​
40​
8/3/2018​
1800​
1800​
100.00%​
6​
1435545​
40​
8/6/2018​
1030​
1030​
100.00%​
7​
1435546​
99​
8/7/2018​
1784​
2530​
68.18%​
8​
1435547​
40​
8/8/2018​
1500​
1594​
103.73%​
9​
1442957​
99​
8/8/2018​
125​
0​
0.00%​
10​
1435548​
40​
8/9/2018​
1784​
1749​
98.04%​
11​
1435549​
40​
8/10/2018​
1784​
2433​
73.62%​
12​
1435550​
40​
8/13/2018​
1505​
429​
28.50%​
13​
1435551​
30​
8/14/2018​
1784​
0​
0.00%​
14​
1435552​
30​
8/15/2018​
1505​
0​
0.00%​
15​
1435553​
90​
8/16/2018​
1784​
0​
0.00%​
16​
1435554​
95​
8/17/2018​
1784​
0​
0.00%​
17​
1435555​
30​
8/20/2018​
3510​
0​
0.00%​
18​
19​
67.14%​
f19: {=average(if((b2:b17=30) + (b2:b17=40)*(f2:f17>0) + (b2:b17>=90) * (f2:f17>0), f2:f17))}

<tbody>
</tbody>
 
Last edited:
Upvote 0
Hello again,

I wonder, what about calculating the average but based on the first digit of the part number - I have 3 (3, 4, 8)

Is this possible to search column A looking at ALL the parts with 3's and calculate the average in column G? Would this be an index Match?

Thanks for any expertise you have
 
Last edited:
Upvote 0
I have gotten my formula to work
Code:
=IF(VALUE($B$2:$B$150)>1,1,AVERAGE(IF(LEFT(A2:A150,2)="3-",1,$G1:$G150)))
- however I do have blanks within the average column I need to be included in the formula.

I did try "sum" instead of average / countif(G2:G150,"<>0" but it resulted in 1 from the "if(value)" in the beginning.

Another condition is I face multiple WO #'s in column B but part numbers in Column A.

I need all WO #'s associated with the part number. For example I could have Part #A with 7 WO's then the next part would start. I do not have a part number next to each WO #.

Thanks again if you're able to assist.


Hello again,

I wonder, what about calculating the average but based on the first digit of the part number - I have 3 (3, 4, 8)

Is this possible to search column A looking at ALL the parts with 3's and calculate the average in column G? Would this be an index Match?

Thanks for any expertise you have
 
Upvote 0

Forum statistics

Threads
1,214,897
Messages
6,122,148
Members
449,066
Latest member
Andyg666

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