View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Pete_UK Pete_UK is offline
external usenet poster
 
Posts: 8,856
Default AVG or Return 1 value from either of 2 cells if one is blank

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