+ Reply to Thread
Results 1 to 9 of 9

Vlookup that searches for text within a cell that is listed in a table arrary

  1. #1
    Registered User
    Join Date
    05-04-2014
    Location
    Melbourne, Aus
    MS-Off Ver
    Excel 2007
    Posts
    2

    Vlookup that searches for text within a cell that is listed in a table arrary

    Hi,

    I want to create a vlookup formula that will search within the text of a cell for any word that is listed in a table array. Then if text is found that is listed in the table array, return the relevant column.

    I want to use this formula to allocate lines from a bank statement to a category quickly and without having to manually select each line.

    In this example I would want the formula to search for any text within column B that is listed in the table in column F. If yes, return column G. If not, error out.
    Capture.PNG

    As "Golf" is contained in cell B2, the formula should return G2 "1-2300"

    I have tried a combination of formulas but cannot wort this out. Your help would be appreciated.

    Ross

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,481

    Re: Vlookup that searches for text within a cell that is listed in a table arrary

    Try:
    =IFERROR(LOOKUP(2,1/ISNUMBER(SEARCH($F$2:$F$3,B2)),$G$2:$G$3),"")
    Quang PT

  3. #3
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Vlookup that searches for text within a cell that is listed in a table arrary

    Another variation.....

    Try this Array Formula in D2. Since this is an array formula so you need to confirm it with Ctrl+Shift+Enter instead of just Enter. (i.e. hold down the Ctrl + Shift and then press Enter)

    Please Login or Register  to view this content.
    and then drag down.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  4. #4
    Registered User
    Join Date
    05-04-2014
    Location
    Melbourne, Aus
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Vlookup that searches for text within a cell that is listed in a table arrary

    Thanks! that's exactly what I was after

  5. #5
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Vlookup that searches for text within a cell that is listed in a table arrary

    Glad to help you. Thanks for the feedback and rep.

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Vlookup that searches for text within a cell that is listed in a table arrary

    Quote Originally Posted by bebo021999 View Post
    Try:
    =IFERROR(LOOKUP(2,1/ISNUMBER(SEARCH($F$2:$F$3,B2)),$G$2:$G$3),"")
    You don't need the ISNUMBER function.

    =IFERROR(LOOKUP(2,1/SEARCH(F$2:F$3,B2),G$2:G$3),"")
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  7. #7
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Vlookup that searches for text within a cell that is listed in a table arrary

    @Tony Valko

    Correct.

  8. #8
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,481

    Re: Vlookup that searches for text within a cell that is listed in a table arrary

    Thank Tony

  9. #9
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Vlookup that searches for text within a cell that is listed in a table arrary

    ------

+ 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/Then Assistance: Text Into Cell if listed
    By Alisa0225 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-26-2014, 05:07 PM
  2. Replies: 8
    Last Post: 01-31-2014, 03:20 PM
  3. LOOKUP that searches cell for text from end, not start.
    By vonRobbo in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-03-2013, 10:08 PM
  4. Replies: 2
    Last Post: 02-18-2013, 06:35 PM
  5. please help Need VBA code that searches for partial text in a cell
    By Shani in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-13-2006, 11:25 AM

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