#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default If/then formulas

I have a worksheet that has a formula for one of the cells (=SUM(J5*F5)-G5).
Now I need to put an if/then formula into that particular formula. When I use
the formula above, the answers sometimes come out negative (which is normal)
but I need it to be programmed where, if the answer comes out negative, then
it should automatically be adjusted to $0. How do I add and if/then formula
to a formula already given??
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,942
Default If/then formulas

hi
=IF(SUM(J5*F5)-G5<0,0,SUM(J5*F5)-G5)


Regards
FSt1

"akerney" wrote:

I have a worksheet that has a formula for one of the cells (=SUM(J5*F5)-G5).
Now I need to put an if/then formula into that particular formula. When I use
the formula above, the answers sometimes come out negative (which is normal)
but I need it to be programmed where, if the answer comes out negative, then
it should automatically be adjusted to $0. How do I add and if/then formula
to a formula already given??

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,440
Default If/then formulas

First, you don't need the SUM part;
This will do:
=(J5*F5)-G5

New formula:
=MAX((J5*F5)-G5),0)

--
Kind regards,

Niek Otten
Microsoft MVP - Excel


"akerney" wrote in message ...
|I have a worksheet that has a formula for one of the cells (=SUM(J5*F5)-G5).
| Now I need to put an if/then formula into that particular formula. When I use
| the formula above, the answers sometimes come out negative (which is normal)
| but I need it to be programmed where, if the answer comes out negative, then
| it should automatically be adjusted to $0. How do I add and if/then formula
| to a formula already given??


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,345
Default If/then formulas

Try:

=MAX(J5*F5-G5,0)
Note that the neither the SUM() not the parenthesis around J5*F5 are
required because in XL multiplication takes precedence over subtraction.


--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"akerney" wrote in message
...
I have a worksheet that has a formula for one of the cells
(=SUM(J5*F5)-G5).
Now I need to put an if/then formula into that particular formula. When I
use
the formula above, the answers sometimes come out negative (which is
normal)
but I need it to be programmed where, if the answer comes out negative,
then
it should automatically be adjusted to $0. How do I add and if/then
formula
to a formula already given??



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
CELLS NOT CALC FORMULAS - VALUES STAY SME FORMULAS CORRECT?? HELP Sherberg Excel Worksheet Functions 4 September 11th 07 01:34 AM
lookup formulas dependent upon lookup formulas Skibee Excel Worksheet Functions 1 July 20th 07 01:06 PM
automatically copy formulas down columns or copy formulas all the HowlingBlue Excel Worksheet Functions 1 March 16th 07 11:11 PM
Formulas not evaluated, Formulas treated as strings Bob Sullentrup Excel Discussion (Misc queries) 0 November 27th 06 08:01 PM
formulas for changing formulas? creativeops Excel Discussion (Misc queries) 4 January 26th 06 03:07 AM


All times are GMT +1. The time now is 08:32 PM.

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

About Us

"It's about Microsoft Excel"