AVG or Return 1 value from either of 2 cells if one is blank
Hi Pete,
Sorry MY fault. I did not phrase the question or the subject line correctly.
E8 or H8 can be either a value 0, 0 or blank. If both are a value then I
need the avg. If either one is blank or 0 then I need the other value
returned.
Thanks to both you and Mike for replying and sorry again :-)
--
Diddy
"Pete_UK" wrote:
Here's another way (avoiding the IF):
=SUM(E8,H8)/COUNT(E8,H8)
Hope this helps.
Pete
On Feb 18, 11:00 am, Diddy wrote:
Hi everyone,
I'm using the following formula to average the values of 2 cells. If either
is empty, I want it to return the value in the non-blank cell.
=IF(AND(E80,H80),AVERAGE(E8,H8),SUM(E8,H8))
This works fine but is there a better way to do it?
Cheers
--
Diddy
|