+ Reply to Thread
Results 1 to 15 of 15

Using a Formula in a Conditional Statement?

  1. #1
    Registered User
    Join Date
    07-10-2005
    Posts
    2

    Using a Formula in a Conditional Statement?

    Is there a way to utilize a formula within a conditional statement? I am an undergraduate student doing research in hydrology and am constructing a water balance. What I need is the following: =IF(B5>0,"0",IF(B5<0,"=abs(B5)")), where the "abs(B5)" would be the absolute value of the cell B5 inserted into the spreadsheet.

    Thank you for your help.

  2. #2
    Forum Contributor
    Join Date
    03-12-2004
    Posts
    329
    =IF(B5>0,0,ABS(B5))



    Quote Originally Posted by Templee1
    Is there a way to utilize a formula within a conditional statement? I am an undergraduate student doing research in hydrology and am constructing a water balance. What I need is the following: =IF(B5>0,"0",IF(B5<0,"=abs(B5)")), where the "abs(B5)" would be the absolute value of the cell B5 inserted into the spreadsheet.

    Thank you for your help.

  3. #3
    Dave R.
    Guest

    Re: Using a Formula in a Conditional Statement?

    You've almost got it, but you need to remove the = from before the ABS, and
    take the quotes out too. Quotes are for text..

    =IF(B5>0,0,IF(B5<0,ABS(B5)))



    "Templee1" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Is there a way to utilize a formula within a conditional statement? I
    > am an undergraduate student doing research in hydrology and am
    > constructing a water balance. What I need is the following:
    > =IF(B5>0,"0",IF(B5<0,"=abs(B5)")), where the "abs(B5)" would be the
    > absolute value of the cell B5 inserted into the spreadsheet.
    >
    > Thank you for your help.
    >
    >
    > --
    > Templee1
    > ------------------------------------------------------------------------
    > Templee1's Profile:

    http://www.excelforum.com/member.php...o&userid=25083
    > View this thread: http://www.excelforum.com/showthread...hreadid=387263
    >




  4. #4
    Dave R.
    Guest

    Re: Using a Formula in a Conditional Statement?

    You've almost got it, but you need to remove the = from before the ABS, and
    take the quotes out too. Quotes are for text..

    =IF(B5>0,0,IF(B5<0,ABS(B5)))



    "Templee1" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Is there a way to utilize a formula within a conditional statement? I
    > am an undergraduate student doing research in hydrology and am
    > constructing a water balance. What I need is the following:
    > =IF(B5>0,"0",IF(B5<0,"=abs(B5)")), where the "abs(B5)" would be the
    > absolute value of the cell B5 inserted into the spreadsheet.
    >
    > Thank you for your help.
    >
    >
    > --
    > Templee1
    > ------------------------------------------------------------------------
    > Templee1's Profile:

    http://www.excelforum.com/member.php...o&userid=25083
    > View this thread: http://www.excelforum.com/showthread...hreadid=387263
    >




  5. #5
    Dave R.
    Guest

    Re: Using a Formula in a Conditional Statement?

    You've almost got it, but you need to remove the = from before the ABS, and
    take the quotes out too. Quotes are for text..

    =IF(B5>0,0,IF(B5<0,ABS(B5)))



    "Templee1" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Is there a way to utilize a formula within a conditional statement? I
    > am an undergraduate student doing research in hydrology and am
    > constructing a water balance. What I need is the following:
    > =IF(B5>0,"0",IF(B5<0,"=abs(B5)")), where the "abs(B5)" would be the
    > absolute value of the cell B5 inserted into the spreadsheet.
    >
    > Thank you for your help.
    >
    >
    > --
    > Templee1
    > ------------------------------------------------------------------------
    > Templee1's Profile:

    http://www.excelforum.com/member.php...o&userid=25083
    > View this thread: http://www.excelforum.com/showthread...hreadid=387263
    >




  6. #6
    Dave R.
    Guest

    Re: Using a Formula in a Conditional Statement?

    You've almost got it, but you need to remove the = from before the ABS, and
    take the quotes out too. Quotes are for text..

    =IF(B5>0,0,IF(B5<0,ABS(B5)))



    "Templee1" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Is there a way to utilize a formula within a conditional statement? I
    > am an undergraduate student doing research in hydrology and am
    > constructing a water balance. What I need is the following:
    > =IF(B5>0,"0",IF(B5<0,"=abs(B5)")), where the "abs(B5)" would be the
    > absolute value of the cell B5 inserted into the spreadsheet.
    >
    > Thank you for your help.
    >
    >
    > --
    > Templee1
    > ------------------------------------------------------------------------
    > Templee1's Profile:

    http://www.excelforum.com/member.php...o&userid=25083
    > View this thread: http://www.excelforum.com/showthread...hreadid=387263
    >




  7. #7
    Dave R.
    Guest

    Re: Using a Formula in a Conditional Statement?

    You've almost got it, but you need to remove the = from before the ABS, and
    take the quotes out too. Quotes are for text..

    =IF(B5>0,0,IF(B5<0,ABS(B5)))



    "Templee1" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Is there a way to utilize a formula within a conditional statement? I
    > am an undergraduate student doing research in hydrology and am
    > constructing a water balance. What I need is the following:
    > =IF(B5>0,"0",IF(B5<0,"=abs(B5)")), where the "abs(B5)" would be the
    > absolute value of the cell B5 inserted into the spreadsheet.
    >
    > Thank you for your help.
    >
    >
    > --
    > Templee1
    > ------------------------------------------------------------------------
    > Templee1's Profile:

    http://www.excelforum.com/member.php...o&userid=25083
    > View this thread: http://www.excelforum.com/showthread...hreadid=387263
    >




  8. #8
    Dave R.
    Guest

    Re: Using a Formula in a Conditional Statement?

    You've almost got it, but you need to remove the = from before the ABS, and
    take the quotes out too. Quotes are for text..

    =IF(B5>0,0,IF(B5<0,ABS(B5)))



    "Templee1" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Is there a way to utilize a formula within a conditional statement? I
    > am an undergraduate student doing research in hydrology and am
    > constructing a water balance. What I need is the following:
    > =IF(B5>0,"0",IF(B5<0,"=abs(B5)")), where the "abs(B5)" would be the
    > absolute value of the cell B5 inserted into the spreadsheet.
    >
    > Thank you for your help.
    >
    >
    > --
    > Templee1
    > ------------------------------------------------------------------------
    > Templee1's Profile:

    http://www.excelforum.com/member.php...o&userid=25083
    > View this thread: http://www.excelforum.com/showthread...hreadid=387263
    >




  9. #9
    Dave R.
    Guest

    Re: Using a Formula in a Conditional Statement?

    You've almost got it, but you need to remove the = from before the ABS, and
    take the quotes out too. Quotes are for text..

    =IF(B5>0,0,IF(B5<0,ABS(B5)))



    "Templee1" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Is there a way to utilize a formula within a conditional statement? I
    > am an undergraduate student doing research in hydrology and am
    > constructing a water balance. What I need is the following:
    > =IF(B5>0,"0",IF(B5<0,"=abs(B5)")), where the "abs(B5)" would be the
    > absolute value of the cell B5 inserted into the spreadsheet.
    >
    > Thank you for your help.
    >
    >
    > --
    > Templee1
    > ------------------------------------------------------------------------
    > Templee1's Profile:

    http://www.excelforum.com/member.php...o&userid=25083
    > View this thread: http://www.excelforum.com/showthread...hreadid=387263
    >




  10. #10
    Dave R.
    Guest

    Re: Using a Formula in a Conditional Statement?

    You've almost got it, but you need to remove the = from before the ABS, and
    take the quotes out too. Quotes are for text..

    =IF(B5>0,0,IF(B5<0,ABS(B5)))



    "Templee1" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Is there a way to utilize a formula within a conditional statement? I
    > am an undergraduate student doing research in hydrology and am
    > constructing a water balance. What I need is the following:
    > =IF(B5>0,"0",IF(B5<0,"=abs(B5)")), where the "abs(B5)" would be the
    > absolute value of the cell B5 inserted into the spreadsheet.
    >
    > Thank you for your help.
    >
    >
    > --
    > Templee1
    > ------------------------------------------------------------------------
    > Templee1's Profile:

    http://www.excelforum.com/member.php...o&userid=25083
    > View this thread: http://www.excelforum.com/showthread...hreadid=387263
    >




  11. #11
    Dave R.
    Guest

    Re: Using a Formula in a Conditional Statement?

    You've almost got it, but you need to remove the = from before the ABS, and
    take the quotes out too. Quotes are for text..

    =IF(B5>0,0,IF(B5<0,ABS(B5)))



    "Templee1" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Is there a way to utilize a formula within a conditional statement? I
    > am an undergraduate student doing research in hydrology and am
    > constructing a water balance. What I need is the following:
    > =IF(B5>0,"0",IF(B5<0,"=abs(B5)")), where the "abs(B5)" would be the
    > absolute value of the cell B5 inserted into the spreadsheet.
    >
    > Thank you for your help.
    >
    >
    > --
    > Templee1
    > ------------------------------------------------------------------------
    > Templee1's Profile:

    http://www.excelforum.com/member.php...o&userid=25083
    > View this thread: http://www.excelforum.com/showthread...hreadid=387263
    >




  12. #12
    Dave R.
    Guest

    Re: Using a Formula in a Conditional Statement?

    You've almost got it, but you need to remove the = from before the ABS, and
    take the quotes out too. Quotes are for text..

    =IF(B5>0,0,IF(B5<0,ABS(B5)))



    "Templee1" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Is there a way to utilize a formula within a conditional statement? I
    > am an undergraduate student doing research in hydrology and am
    > constructing a water balance. What I need is the following:
    > =IF(B5>0,"0",IF(B5<0,"=abs(B5)")), where the "abs(B5)" would be the
    > absolute value of the cell B5 inserted into the spreadsheet.
    >
    > Thank you for your help.
    >
    >
    > --
    > Templee1
    > ------------------------------------------------------------------------
    > Templee1's Profile:

    http://www.excelforum.com/member.php...o&userid=25083
    > View this thread: http://www.excelforum.com/showthread...hreadid=387263
    >




  13. #13
    Dave R.
    Guest

    Re: Using a Formula in a Conditional Statement?

    You've almost got it, but you need to remove the = from before the ABS, and
    take the quotes out too. Quotes are for text..

    =IF(B5>0,0,IF(B5<0,ABS(B5)))



    "Templee1" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Is there a way to utilize a formula within a conditional statement? I
    > am an undergraduate student doing research in hydrology and am
    > constructing a water balance. What I need is the following:
    > =IF(B5>0,"0",IF(B5<0,"=abs(B5)")), where the "abs(B5)" would be the
    > absolute value of the cell B5 inserted into the spreadsheet.
    >
    > Thank you for your help.
    >
    >
    > --
    > Templee1
    > ------------------------------------------------------------------------
    > Templee1's Profile:

    http://www.excelforum.com/member.php...o&userid=25083
    > View this thread: http://www.excelforum.com/showthread...hreadid=387263
    >




  14. #14
    Dave R.
    Guest

    Re: Using a Formula in a Conditional Statement?

    You've almost got it, but you need to remove the = from before the ABS, and
    take the quotes out too. Quotes are for text..

    =IF(B5>0,0,IF(B5<0,ABS(B5)))



    "Templee1" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Is there a way to utilize a formula within a conditional statement? I
    > am an undergraduate student doing research in hydrology and am
    > constructing a water balance. What I need is the following:
    > =IF(B5>0,"0",IF(B5<0,"=abs(B5)")), where the "abs(B5)" would be the
    > absolute value of the cell B5 inserted into the spreadsheet.
    >
    > Thank you for your help.
    >
    >
    > --
    > Templee1
    > ------------------------------------------------------------------------
    > Templee1's Profile:

    http://www.excelforum.com/member.php...o&userid=25083
    > View this thread: http://www.excelforum.com/showthread...hreadid=387263
    >




  15. #15
    Dave R.
    Guest

    Re: Using a Formula in a Conditional Statement?

    You've almost got it, but you need to remove the = from before the ABS, and
    take the quotes out too. Quotes are for text..

    =IF(B5>0,0,IF(B5<0,ABS(B5)))



    "Templee1" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Is there a way to utilize a formula within a conditional statement? I
    > am an undergraduate student doing research in hydrology and am
    > constructing a water balance. What I need is the following:
    > =IF(B5>0,"0",IF(B5<0,"=abs(B5)")), where the "abs(B5)" would be the
    > absolute value of the cell B5 inserted into the spreadsheet.
    >
    > Thank you for your help.
    >
    >
    > --
    > Templee1
    > ------------------------------------------------------------------------
    > Templee1's Profile:

    http://www.excelforum.com/member.php...o&userid=25083
    > View this thread: http://www.excelforum.com/showthread...hreadid=387263
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1