#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 492
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,393
Default 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



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default 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

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Possibly a loaded question, but I think mileslit Excel Discussion (Misc queries) 1 September 10th 05 01:18 AM
How do I find and replace a question mark in Excel? Ranpalandil Excel Discussion (Misc queries) 1 September 7th 05 10:20 PM
Newbie With A Question Michael Excel Worksheet Functions 0 July 28th 05 11:50 PM
Anybody Help with previous question Anthony Excel Discussion (Misc queries) 1 July 26th 05 01:26 PM
Hints And Tips For New Posters In The Excel Newsgroups Gary Brown Excel Worksheet Functions 0 April 15th 05 05:47 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"