View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
David Biddulph
 
Posts: n/a
Default If Statement with Sum

"Chip1035" wrote in message
...
I did not know how to search for this, so my apologies if it has been
posted
before.
A1 | B1 | C1 | D1
$20 $35 $5 $5
I have in A1, $20 allowed, B1 has $35 used, C1 is $5 left over from
previous
month
What I want D1 to have is the amount over what was allowed in A1 but not
to
exceed what is in C1. Also, if B1 does not exceed A1, then D1 should be
blank.
So far I came up with this
IF(G6E6,G6-E6,"") which would get me 15, which is over C1. If it is over
C1, I want it to equal C1. I tried this:
IF(B1A1,(SUM(B1-A1)C1,C1),"") but got an #VALUE! error.
Thank you for any and all assistance, in advance.


=IF(B1A1,MIN((B1-A1),C1),"")
--
David Biddulph