Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Help with Excel IF/THEN statement.  (Read 2484 times)

0 Members and 1 Guest are viewing this topic.

smitty10492

    Topic Starter


    Beginner

    • Computer: Specs
    • Experience: Beginner
    • OS: Windows 7
    Help with Excel IF/THEN statement.
    « on: June 17, 2011, 12:14:14 PM »
    Here is my statement:

    =IF(B207<=149,"6N/25L",IF(OR(B207>=150,B207<=199),"7N/25L",IF(B207 >=200,"8N/25L")))

    What I am trying to do is:

    Cell value of 149 or to less show up as 6N/25L, Cell value between 150-199 to show up as 7N/25L, Cell value of 200 or higher to show up as 8N/25L.

    The statement will work for the cells values up to 199. When it reaches 200 or greater it stays at 7N/25L. 

    Any ideas why the last part of this statement is not working?

    Thanks.

    soybean



      Genius
    • The first soybean ever to learn the computer.
    • Thanked: 469
    • Computer: Specs
    • Experience: Experienced
    • OS: Windows 10
    Re: Help with Excel IF/THEN statement.
    « Reply #1 on: June 17, 2011, 03:24:05 PM »
    Are 6N, 7N, 8N, and 25L supposed to be cell references?  If so, they are not valid; you have the numerical part and the alphabetical part of the cell reference reversed.  In other words, it should be N6, N7, etc.

    smitty10492

      Topic Starter


      Beginner

      • Computer: Specs
      • Experience: Beginner
      • OS: Windows 7
      Re: Help with Excel IF/THEN statement.
      « Reply #2 on: June 17, 2011, 04:13:58 PM »
       6N, 7N, 8N, and 25L are the text values that are supposed to show up when the conditions are met.

      soybean



        Genius
      • The first soybean ever to learn the computer.
      • Thanked: 469
      • Computer: Specs
      • Experience: Experienced
      • OS: Windows 10
      Re: Help with Excel IF/THEN statement.
      « Reply #3 on: June 17, 2011, 04:30:42 PM »
      Well, I believe your logic got a bit convoluted, particularly with the OR statement.  Try this:

      =IF(B207<=149,"6N/25L",(IF(B207<=199,"7N/25L","8N/25L")))

      smitty10492

        Topic Starter


        Beginner

        • Computer: Specs
        • Experience: Beginner
        • OS: Windows 7
        Re: Help with Excel IF/THEN statement.
        « Reply #4 on: June 21, 2011, 05:01:36 AM »
        Thank you very much. The formula worked for what I was trying to do.