View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ashish Mathur[_2_] Ashish Mathur[_2_] is offline
external usenet poster
 
Posts: 1,766
Default IF function question

Hi,

Your question is not very clear. Anyways, try this

=IF($E11-$F11+$G11-$H110,+$E11-$F11+$G11,IF($E11-$F11+$G11-$H11<0,-(+$E11-$F11+$G11-$H11),0))

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Ashish Mathur" wrote in message
...
Hi,

You can try this
=IF(E11-F11+G11-H110,+E11-F11+G11,IF(E11-F11+G11-H11<0,-(+E11-F11+G11-H11),0))

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Dutilbug" wrote in message
...
My teacher has offered bonus points if we can use the same formula in two
different cells to obtain different results. This is for an accounting
worksheet with entries similar to:

Columns E&F Columns G&H Columns I&J
Debit Credit Debit Credit Debit Credit
5 0 5 0 10
0
0 3 7 0 4
0
0 3 0 7 0
10

My column I formula: =IF(E11-F11+G11-H110,+E11-F11+G11,0)
My column J formula: =IF(E11-F11+G11-H11<0,-(+E11-F11+G11-H11),0)

Only one of the I & J columns can have an amount above zero in it and the
other has to be zero. The formula in both I and J must be the same.