Forum

Notifications
Clear all

How do you Exclude 0

6 Posts
3 Users
0 Reactions
59 Views
(@benjamip)
Posts: 89
Estimable Member
Topic starter
 

Hi,

 

How can I alter this formula so that it does not include zeros?

=AVERAGEIF($E$4:$E$158,$C160,F$4:F$158)

 

Thanks

Paul

 
Posted : 01/05/2019 11:02 am
Anders Sehlstedt
(@sehlsan)
Posts: 968
Prominent Member
 

Hello,

You have to add  ”<>0” as a criteria.

 
Posted : 01/05/2019 1:46 pm
(@benjamip)
Posts: 89
Estimable Member
Topic starter
 

Hi Anders,

I did try that using formula; =AVERAGEIF($E$4:$E$158,$C160,F$4:F$158,"<>0") but I get an error message that says 'You've entered too many arguments for this function'?

Thanks

Paul

 
Posted : 02/05/2019 5:51 am
Anders Sehlstedt
(@sehlsan)
Posts: 968
Prominent Member
 

Hello Paul,

When you have two or more criterias you have to use AVERAGEIFS function.

The syntax is =AVERAGEIFS(average_range, criteria_range1, criteria1, criteria_range2, criteria2,…)

So assuming the criteria range is the same your formula should then be =AVERAGEIFS(F$4:F$158, $E$4:$E$158, $C$160, $E$4:$E$158, ”<>0”)

 
Posted : 02/05/2019 11:22 am
(@debaser)
Posts: 836
Member Moderator
 

I'd have guessed the 0s were in column F, so:

 

=AVERAGEIFS(F$4:F$158,$E$4:$E$158,$C160,F$4:F$158,"<>0")

 
Posted : 03/05/2019 4:41 am
(@benjamip)
Posts: 89
Estimable Member
Topic starter
 

Many thanks to Anders & Velouria

Simple when you know how?

Regards

Paul

 
Posted : 04/05/2019 4:24 am
Share: