AverageIFS based on partial text search

AnilPullagura

Board Regular
Joined
Nov 19, 2010
Messages
98
Hello Pros,

My mind is not co-operating with me today. Need help on this:

=AVERAGEIFS(F3:F161,C3:C161,">*Mentor*",F3:F161,"> 0%")

I want to average all cells in the range F3:F161 based on below conditions:


  • Should ignore cells with zero values in the average range(F3:F161)
  • Should ignore cells with the text "Mentor" in the range C3:C161
Quick help on this is required. Thanks in advance.

Anil:(
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Hello, try this;

Change your formula to

=AVERAGEIFS(F3:F161,C3:C161,"<>*Mentor*",F3:F161,">0")

Or

=SUMIF(C3:C161,"<>*Mentor*",F3:F161)/MAX(1,COUNTIFS(C3:C161,"<>*Mentor*",F3:F161,">0"))

Or,

=AVERAGE(IF(1-ISNUMBER(SEARCH("Mentor",C3:C161)),IF(F3:F161>0,IF(ISNUMBER(F3:F161),F3:F161))))

Confirmed with CTRL+SHIFT+ENTER
 
Last edited:
Upvote 0
Hi Anil,

If there are empty cells or words in the range, the function only count cells with numbers, as you can see below, 3 results are equal with 3 different average functions. But ignoring that it should look like this.
Excel Workbook
FGHI
3237.446753237.446753237.4467532
43
517
63
74
8
97.4
107.8
118.2
128.6
139
149.4
15
1610.2
17Mentor
1811
1911.4
...
Cell Formulas
RangeFormula
G3=AVERAGE(F3:F161)
H3=AVERAGEIFS(F3:F161,F3:F161,">0",F3:F161,"<>*Mentor*")
I3=AVERAGEIF(F3:F161,">0")


Regards
 
Upvote 0

Forum statistics

Threads
1,224,607
Messages
6,179,871
Members
452,948
Latest member
UsmanAli786

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