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 / New Users / April 2008

Tip: Looking for answers? Try searching our database.

Double if statements?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Shhhh - 14 Apr 2008 12:55 GMT
Hello all...

I currently have this formula, which works fine...

=IF(A20="L",L20-H20,H20-L20)

however now what I want to do is add an if statement to same cell that
says essentially...

If J20 is blank...  return $0, otherwise do above formula.

Is this possible?

Thank you all,
This group is a life saver!!

Shhhh
FSt1 - 14 Apr 2008 13:20 GMT
hi
nested if
=if(J20="",0,if(A20="L",L20-H20,H20-L20))

you can nest up to 7 ifs.
Regards
FSt1

> Hello all...
>
[quoted text clipped - 13 lines]
>
> Shhhh
AdamV - 14 Apr 2008 15:01 GMT
That nested IF will work for you, but it seems you may be doing some stuff a
;ong way round here.
Am I right in guessing that A20 has a formula which checks which of H20 and
L20 is smaller, so you can then do the minus the right way round?
If that is the case, you could do away with your IF altogether and just use
the ABS function, which basically throws away any minus sign, so you would
use ABS(L20-H20) and it will give you the difference between the higher and
lowerr of them.
So now you have something simpler like =IF(J20="",0,ABS(L20-H20))

> Hello all...
>
[quoted text clipped - 13 lines]
>
> Shhhh
 
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.