IF statement with an OR....

Options

I'm pretty new to all of this, and the examples I've viewed are not helping. I have a column two columns and need a third to show a value based off the first two. If a column "grade" = "NBC" and other column has grade "abc" or "def" or "ghi" or "jkl" or "MNO" or "PQR" or STU" or "XYZ", then I need to show the: abc" or "def" or "ghi" or "jkl" or "MNO" or "PQR" or STU" or "XYZ".  It's not a simple IF statement, and I don't know how to put in the multiple ors to show the value.

Answers

  • Genevieve P.
    Genevieve P. Employee Admin
    Options

    Hi Brian,

    Would you mind clarifying a little more? Is this a cross-sheet formula, looking at these two columns, or is it within the same sheet?

    Also, what type of column is the second column with the "abc", "def", etc.? Is this Text/Number, Single Select, or Multi Select? Could there be multiple selections at one time, or will there only ever be one selection? (This will change what functions may be needed to look into that cell... we could use CONTAINS or we could use HAS if it's Multi-Select).

    It would be most helpful to see a screen capture of the sheet with these two columns if possible, but please block out any sensitive data.

    Thanks!

    Genevieve

  • Genevieve,


    These are on the same sheet, text/number columns on both. I'm using Previous Base and Base. If the Base shows NBC, and Previous base is ATL or NYC or a few other options, I'd like the column to say ATL. Attached is a screenshot. This formula will go in the column CPO.


  • John Jonassen
    John Jonassen ✭✭✭✭
    Options

    Can you create a specific sheet that will serve as a lookup table for all Previous Base/Base combinations that includes a helper column concatenating the two together, then a CPO column that you define/hard code for each combination?


    Then on the sheet that you provided the screenshot of, concatenate the Previous Base and base in the same structure as in the lookup sheet, then write a lookup formula to provide the correct CPO.


    Make sense?