+ Reply to Thread
Results 1 to 6 of 6

IF statement: if A2="one of these 5 words", then YES, otherwise NO

  1. #1
    Registered User
    Join Date
    08-13-2013
    Location
    Brighton, England
    MS-Off Ver
    Excel 2003
    Posts
    6

    IF statement: if A2="one of these 5 words", then YES, otherwise NO

    I'm trying to create a column saying whether staff are "Trained" or "Untrained".
    Without being old school and doing find and replace!

    Say for arguments sake there are 5 different "trained" grades.

    I want the IF statement to say

    =(IF

    The value in A2 is any of these:
    NQA1
    NQA2
    NQA3
    etc (not all starting NQA btw!)

    then value in new column is TRAINED

    If anything else - UNTRAINED



    I know how to do this when it's either a value, or it's not - but how do I do it to check it against a list of values?
    I've had a search but maybe I'm not looking for right words.


    Thanks,

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: IF statement: if A2="one of these 5 words", then YES, otherwise NO

    =IF(ISNUMBER(MATCH(A2,{"NQA1","NQA2","NQA3"},0)),"Trained","Untrained")

  3. #3
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: IF statement: if A2="one of these 5 words", then YES, otherwise NO

    One way.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: IF statement: if A2="one of these 5 words", then YES, otherwise NO

    =IF(OR(A2={"NQA1","NQA2","NQA3"}),"trained","untrained ")
    or slightly longer
    =IF(ISNUMBER(MATCH(A2,{"NQA1","NQA2","NQA3"},0)),"trained","untrained ")
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: IF statement: if A2="one of these 5 words", then YES, otherwise NO

    Try:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  6. #6
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: IF statement: if A2="one of these 5 words", then YES, otherwise NO

    Thanks for the rep. So

    As that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED,as per Forum Rule #9. Thank you.

    Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. If cell contains "word" then replace with "these words"
    By yellow281 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-21-2013, 07:19 PM
  2. Using "IF" statement when cell contains key words
    By macquhele in forum Excel General
    Replies: 4
    Last Post: 06-19-2012, 06:51 AM
  3. Replies: 10
    Last Post: 01-26-2012, 08:26 AM
  4. Remove "TRUE" "FALSE" words from a linked checkbox
    By MDCK in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-15-2008, 03:26 AM
  5. Replies: 3
    Last Post: 12-14-2006, 01:36 PM

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