Getting AVERAGE to ignore zero outcome from formulae

gdcuk

New Member
Joined
Dec 8, 2019
Messages
3
Office Version
  1. 2019
Platform
  1. Windows
I have the following formula to average the outcome of three calculations:

=IF(I24="","",ROUND(AVERAGE(E27*I26/F26,F27*I26/G26,G27*I26/H26),2))

How do I adapt the formula to ignore a zero outcome of any of the nested formulae?

e.g.

If (E27*I26/F26 , F27*I26/G26 , G27*I26/H26) worked out as (0, 5, 10), I want the average returned to be 7.5 rather than 5

Thanks in advance
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Let's try this and see if it works for you.

Code:
=IF(I24="","",ROUND(AVERAGE(IF(E27:G27*I26/E26:G26=0,"",E27:G27*I26/E26:G26)),2))
 
Upvote 0
Thanks for the reply.

I managed to work around it by turning the outcome of the formula in E27,F27 & G27 to blank if the answer to their respective formulae was zero, then adapted the formula to:

=IF(I24="","",ROUND(AVERAGE(IF(E27="",E27,E27*I26/F26),IF(F27="",F27,F27*I26/G26),IF(G27="",G27,G27*I26/H26)),2))
 
Upvote 0

Forum statistics

Threads
1,214,520
Messages
6,120,003
Members
448,935
Latest member
ijat

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