averageif

Charlene Durand

Board Regular
Joined
Sep 19, 2015
Messages
101
Office Version
  1. 365
Platform
  1. Windows
I have a companies earnings that if there are no earnings in that year i need to take the average of last three months.

SO if my column AO (TOTAL "Months average earnings") is 0 i want the column AQ to show me the average of the last three months so

what formula will i use i have this so far but it not working

=AVERAGEIF(AO12,"0",AW12:AY12)
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
The formula works, just get Div0 when it is different than 0.
To avoid that I surronder the formula with
Code:
=iferror([COLOR=#333333]AVERAGEIF(AO12,"0",AW12:AY12)[/COLOR],"")
As I have a 0 (number), I don't the the "" around 0 but it works with it.
You could also use
Code:
=if(AO12=0,average([COLOR=#333333]AW12:AY12),"")[/COLOR]
and if it does not work, I would test
Code:
=ao12=0
in a cell. If it says false, you might have 0.21 as a value but it is rounded to 0 on your view
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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