+ Reply to Thread
Results 1 to 4 of 4

IF formula question:LOTS clearer to write it

  1. #1
    Rubix
    Guest

    IF formula question:LOTS clearer to write it

    My question is, I want to add "if" E2 is blank leave R2 blank in
    addition to formula below.

    This Formula is in R2 cell.

    =IF(P2<1,"A",IF(P2>1,"B",IF(P2<2,"G")))

    Thanks,
    Rube

  2. #2
    Harlan Grove
    Guest

    re: IF formula question:LOTS clearer to write it

    "Rubix" <[email protected]> wrote...
    >My question is, I want to add "if" E2 is blank leave R2 blank in
    >addition to formula below.
    >
    >This Formula is in R2 cell.
    >
    >=IF(P2<1,"A",IF(P2>1,"B",IF(P2<2,"G")))


    E2? Do you mean P2?

    The formula above would only return "G" when P2=1. If that's what you want,
    it'd be LOTS clearer to write it as

    =IF(P2<1,"A",IF(P2>1,"B","G"))

    Since P2<1, P2>1 and P2=1 are exhaustive, the only place you could add
    another condition would be as the first test.

    =IF(ISBLANK(E2),"",IF(P2<1,"A",IF(P2>1,"B","G")))



  3. #3

    re: IF formula question:LOTS clearer to write it

    "Rubix" wrote:
    > My question is, I want to add "if" E2 is blank
    > leave R2 blank in addition to formula below.
    > This Formula is in R2 cell.
    > =IF(P2<1,"A",IF(P2>1,"B",IF(P2<2,"G")))


    It is not clear which conditions you want to give
    precedence to; that is, which conditions override
    the others. The following are two possibilities:

    1. "E2 is blank" overrides all other conditions

    =IF(E2="","",IF(P2<1,"A",IF(P2>1,"B",IF(P2<2,"G"))))

    2. All other conditions override "E2 is blank"

    =IF(P2<1,"A",IF(P2>1,"B",IF(P2<2,"G",IF(E2="",""))))

    Note: I have omitted the false-value part of the last IF()
    function, just as you did. In some contexts in Excel,
    that is the right thing to do. But normally, I think it is
    best to have a false-value part

  4. #4
    Rubix
    Guest

    re: IF formula question:LOTS clearer to write it

    Thanks!

+ 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