![]() |
If Statement with Sum
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. -- -Chip =) |
If Statement with Sum
hi! =IF(B1<A1,"",IF(B1A1,MIN(B1-A1,C1),"")) -via135 Chip1035 Wrote: 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. -- -Chip =) -- via135 ------------------------------------------------------------------------ via135's Profile: http://www.excelforum.com/member.php...o&userid=26725 View this thread: http://www.excelforum.com/showthread...hreadid=522308 |
If Statement with Sum
I don't understand what you want to achieve here? After all, 20 - 35 = -15!
However, try the following =IF(AND(B1A1,B1-A1C1),C1,IF(B1A1,B1-A1,IF(B1<A1,0,""))) "Chip1035" wrote: 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. -- -Chip =) |
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 |
If Statement with Sum
Thank you... It worked...
-- -Chip =) "via135" wrote: hi! =IF(B1<A1,"",IF(B1A1,MIN(B1-A1,C1),"")) -via135 Chip1035 Wrote: 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. -- -Chip =) -- via135 ------------------------------------------------------------------------ via135's Profile: http://www.excelforum.com/member.php...o&userid=26725 View this thread: http://www.excelforum.com/showthread...hreadid=522308 |
All times are GMT +1. The time now is 12:22 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com