I have two random cells which at any time may or may not contain a zero that I need to average.
Example 1: H16 = 2.08, H27 = 4.67 Easy average formula (=Average(H16,H27)
Example 2: H16 = 0, H27 = 4.67 How do you average this to exclude zeros?
I have two random cells which at any time may or may not contain a zero that I need to average.
Example 1: H16 = 2.08, H27 = 4.67 Easy average formula (=Average(H16,H27)
Example 2: H16 = 0, H27 = 4.67 How do you average this to exclude zeros?
Last edited by NBVC; 02-10-2012 at 12:29 PM.
Try:
=IF(H16=0,H27,IF(H27=0,H16,AVERAGE(H16,H27))
Where there is a will there are many ways.
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Try this:
=SUM(H16,H27)/IF(H16=0,1,IF(H27=0,1,2))
Or
=SUM(H16,H27)/IF(OR(H16=0,H27=0),1,2)
Quang PT
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks