Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / March 2006

Tip: Looking for answers? Try searching our database.

using if statements

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
LAybar - 17 Mar 2006 20:01 GMT
I am trying to use this if statement:
IF((J8*J25-J10*J25)<=0,"0",IF(J8*J25-J10*J25>0,"J8*J25-J10*J25")), the
problem is I can not figure out how to tell it if the answer is greater than
0, put in the number and not J8*J25-J10*J25, can anyone help?
Chip Pearson - 17 Mar 2006 20:05 GMT
Remove the quotes form the ELSE argument.

=IF((J8*J25-J10*J25)<=0,"0",IF(J8*J25-J10*J25>0,J8*J25-J10*J25))

Signature

Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

>I am trying to use this if statement:
> IF((J8*J25-J10*J25)<=0,"0",IF(J8*J25-J10*J25>0,"J8*J25-J10*J25")),
> the
> problem is I can not figure out how to tell it if the answer is
> greater than
> 0, put in the number and not J8*J25-J10*J25, can anyone help?
LAybar - 17 Mar 2006 20:13 GMT
Chip,
Thank you, I have been staring at this for so long, I just could not see
what the problem was!!!

> Remove the quotes form the ELSE argument.
>
[quoted text clipped - 6 lines]
> > greater than
> > 0, put in the number and not J8*J25-J10*J25, can anyone help?
Bernard Liengme - 17 Mar 2006 20:16 GMT
=IF((J8*J25-J10*J25)<=0, 0, (J8*J25-J10*J25))
Syntax of IF: IF(test, result_when_test_TRUE, result_when_test_FALSE)

Your formula could be simplified to
=IF((J8-J10)*J25<=0, 0, (J8-J10)*J25)

Also you could abandon IF and use
(J8-J10)*J25)*((J8-J10)*J25)>0)
The Boolean expression (J8-J10)*J25)>0 will evaluate to TRUE or FALSE which,
when part of an arithmetic expression, are treated as 1 and 0, respectively.

best wishes
Signature

Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

>I am trying to use this if statement:
> IF((J8*J25-J10*J25)<=0,"0",IF(J8*J25-J10*J25>0,"J8*J25-J10*J25")), the
> problem is I can not figure out how to tell it if the answer is greater
> than
> 0, put in the number and not J8*J25-J10*J25, can anyone help?
Visblr - 20 Mar 2006 15:55 GMT
By putting text between ", the output willbe exactly as typed. remove the "
and you will get the result. so try :

IF((J8*J25-J10*J25)<=0,"0",IF(J8*J25-J10*J25>0,J8*J25-J10*J25))

> I am trying to use this if statement:
> IF((J8*J25-J10*J25)<=0,"0",IF(J8*J25-J10*J25>0,"J8*J25-J10*J25")), the
> problem is I can not figure out how to tell it if the answer is greater than
> 0, put in the number and not J8*J25-J10*J25, can anyone help?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.