AVERAGEIF - If criteria not met problem

Miodrag J

New Member
Joined
Nov 28, 2017
Messages
5
Hello everyone!

I'm experiencing a problem with an AVERAGEIF formula. Let's say I have 10 columns and 5 rows with values ranging 1-5. What I want to achieve is the following: I want the average of values only from those rows where the value "1" isn't appearing. And for the rows where the value "1" is appearing, I want the result to be "FAILED".
I have tried with various formulas', but this one should've done the job for me, because it seems the most logical: =IFERROR(AVERAGEIF($A1:$E1,"<>1",$A1:$E1),"FAILED") . However, it seems that this formula only excludes the value "1" from the average formula. Basically, if there is value "1" appearing once across 5 rows, it only counts the average of the other 4 values.

I hope this wasn't too confusing.

I look forward to your answers and possible solutions.

Best regards,

Miodrag J.
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Try this:


Book1
ABCDEFG
112345FAILED
2234564
334167FAILED
4778998
Sheet2
Cell Formulas
RangeFormula
G1=IF(IFERROR(MATCH(1,$A1:$E1,0),0)=0,AVERAGE($A1:$E1),"FAILED")


WBD
 
Upvote 0
Or the "obvious" solution that I missed of course. Sledgehammer to crack a walnut and all that ...

WBD
 
Upvote 0
@WBD
Don't worry, I 'almost' posted it like this
=IF(COUNTIF($A1:$E1,1),"Failed",AVERAGEIF($A1:$E1,"<>1",$A1:$E1))
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,772
Members
452,353
Latest member
strainu

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