ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   sum question (https://www.excelbanter.com/excel-discussion-misc-queries/102564-sum-question.html)

punter

sum question
 

Hi,

I'm having an issue getting a formula to work. I want to subtract I3
from E3. If that is anything besides zero I then want to subtract the
sum of N3 and O3 from the total of I3-E3. I'm going through my books
and the help topics but cant get it to work. Here is the formula I
have in there now: =sum(E3-I3)-sum(N3:03). I only want it to
subtract the second part of the formula if the first part (E3-I3) is
anything but 0.

Any thoughts?

Thanks

Eddie


--
punter


------------------------------------------------------------------------
punter's Profile: http://www.excelforum.com/member.php...fo&userid=2044
View this thread: http://www.excelforum.com/showthread...hreadid=567276


Alan

sum question
 
=IF(I3-E3<0,SUM(N3,O3)-SUM(E3,E3),0)
Regards,
Alan.
"punter" wrote in
message ...

Hi,

I'm having an issue getting a formula to work. I want to subtract I3
from E3. If that is anything besides zero I then want to subtract the
sum of N3 and O3 from the total of I3-E3. I'm going through my books
and the help topics but cant get it to work. Here is the formula I
have in there now: =sum(E3-I3)-sum(N3:03). I only want it to
subtract the second part of the formula if the first part (E3-I3) is
anything but 0.

Any thoughts?

Thanks

Eddie


--
punter


------------------------------------------------------------------------
punter's Profile:
http://www.excelforum.com/member.php...fo&userid=2044
View this thread: http://www.excelforum.com/showthread...hreadid=567276




Bernard Liengme

sum question
 
First of all let's clear up SUM. You generally use this for something like
=SUM(A1:A10); this sums A1+A2,+A3....+a10
But =SUM(E3-I3) while not wrong, is unnecessary; just use =E3-I3.
And SUM(N3:O3) is better written as =N3+O3 in most cases

Your problem is solved with =IF(E3-I3<0, E3-I3-(N3+O3),0)
I assume you want zero when (E3_I3) is zero
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"punter" wrote in
message ...

Hi,

I'm having an issue getting a formula to work. I want to subtract I3
from E3. If that is anything besides zero I then want to subtract the
sum of N3 and O3 from the total of I3-E3. I'm going through my books
and the help topics but cant get it to work. Here is the formula I
have in there now: =sum(E3-I3)-sum(N3:03). I only want it to
subtract the second part of the formula if the first part (E3-I3) is
anything but 0.

Any thoughts?

Thanks

Eddie


--
punter


------------------------------------------------------------------------
punter's Profile:
http://www.excelforum.com/member.php...fo&userid=2044
View this thread: http://www.excelforum.com/showthread...hreadid=567276




punter

sum question
 

Thank you both so much. You saved me much time.

Eddie.


--
punter


------------------------------------------------------------------------
punter's Profile: http://www.excelforum.com/member.php...fo&userid=2044
View this thread: http://www.excelforum.com/showthread...hreadid=567276


Bob Phillips

sum question
 
If you want 0 even if I3e3 then

=MAX(E3-I3-(N3+O3),0)

otherwise

=E3-I3-(N3+O3)*(E3-I30)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"punter" wrote in
message ...

Hi,

I'm having an issue getting a formula to work. I want to subtract I3
from E3. If that is anything besides zero I then want to subtract the
sum of N3 and O3 from the total of I3-E3. I'm going through my books
and the help topics but cant get it to work. Here is the formula I
have in there now: =sum(E3-I3)-sum(N3:03). I only want it to
subtract the second part of the formula if the first part (E3-I3) is
anything but 0.

Any thoughts?

Thanks

Eddie


--
punter


------------------------------------------------------------------------
punter's Profile:

http://www.excelforum.com/member.php...fo&userid=2044
View this thread: http://www.excelforum.com/showthread...hreadid=567276





All times are GMT +1. The time now is 07:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com