View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Pete_UK Pete_UK is offline
external usenet poster
 
Posts: 8,856
Default If..else..then statement

Not sure why you want the average of C10 and C15 if they are both
zero !!

With my mind-reading cap on, I think you want something like this:

=IF(AND(C10<0,C15<0),AVERAGE(C10,C15),C15+C10)

i.e. take the average of the two if they are both not zero, otherwise
take C15 if C10 is zero, C10 if C15 is zero, or zero if both are zero
(all of which is the same as adding the two together).

Hope this helps.

Pete

On Jun 26, 3:28*pm, Jeff Metcalf
wrote:
I'm trying to write this compare statement, but I keep getting errors about
to many arguements:

In Cell C20
IF C10=0, then C15
ElseIF C15=0, then C10
ElseIF C15=0 and C10=0
then
Average(C10,C15)
Else 0

Thanks in advance