+ Reply to Thread
Results 1 to 7 of 7

Formula to determine if a cell contains a value in a range

  1. #1
    Registered User
    Join Date
    01-05-2007
    Posts
    3

    Question Formula to determine if a cell contains a value in a range

    I need help developing a formula that will look for one of 5 values in a cell and return the value it matches.

    I have a worksheet with a column of descriptions. Within the description can be one of the following drive types: AWD, FWD, RWD, 2WD or 4WD. I want a formula that will look in the description cell and return drive type it finds.

    Appreciate any help I can get.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Try:

    =CHOOSE(SUMPRODUCT((ISNUMBER(SEARCH({"AWD","FWD","RWD","2WD","4WD"},A2)))*(COLUMN($A$1:$E$1))),"AWD","FWD","RWD","2WD","4WD")

    where A2 contains the description...formula can be copied down.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326
    Have a look at the LOOKUP functions

  4. #4
    Registered User
    Join Date
    01-05-2007
    Posts
    3

    Smile

    arthurbr
    Thank you for taking the time to respond. I had looked at the lookup formulas along with multiple others. I have spend hours looking at this website and the Excel Bible trying to figure out on my own.
    NBVC
    THANK YOU THANK YOU THANK YOU. THAT WORKED WONDERFULLY.
    NOW I JUST HAVE TO FIGURE OUT WHAT IT SAYS SO I UNDERSTAND HOW IT WORKS.

    This was my first time posting to this forum and your wonderful.

  5. #5
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326
    A great source for XL information :http://www.cpearson.com/excel.htm

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Here's a simpler way

    =LOOKUP(2^15,SEARCH({"AWD","FWD"," RWD","2WD","4WD"},A2),{"AWD","FWD"," RWD","2WD","4WD"})

    or put your 5 drive types in cells, e.g. D1:D5 and just use

    =LOOKUP(2^15,SEARCH(D$1:D$5,A2),D$1:D$5)

  7. #7
    Registered User
    Join Date
    01-05-2007
    Posts
    3

    Thumbs up Thank You

    Both of those worked also.

+ 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