+ Reply to Thread
Results 1 to 11 of 11

Flexible Text Search with either VLookup or Index Match

  1. #1
    Registered User
    Join Date
    07-05-2012
    Location
    New Jersey, US
    MS-Off Ver
    Excel 2010
    Posts
    57

    Flexible Text Search with either VLookup or Index Match

    I am looking to put in a formula to help return the given campaign name based on if certain keywords are found in the post text. I need the formula to do the following...

    1) From 'Tab 2' image - look at post text in column C and for each row identify the respective campaign from the 'Tab 1' image
    2) If the post text meets any of the text descriptors (rows 3 through 23) on 'Tab 1' image, mark it as the respective campaign from row 2 in 'Tab 1' image
    3) The proper campaign would then be identified in column D in 'Tab 2' image

    *The keywords will be mutually exclusive when identifying the campaign
    ** I would need this to be a flexible formula, as in campaigns and their respective keywords will be added pretty frequently to the table but won't go below the 23rd row (so I don't want to do a long ='if(isnumber(search' formula each time)

    For example, if the post text reads "Hope you #beourguest" in column C on 'Tab 2' image, the campaign Beauty and The Beast should be returned in column D on the 'Tab 2' sheet


    Hope this helps and thank you!

    Tab 2.PNGTab 1.PNG

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,745

    Re: Flexible Text Search with either VLookup or Index Match

    Montoro22,

    We're going to need an uploaded Excel file. I don't think anyone is going to want to retype data you already have in file. With that we can navigate the sheets and test formulas in context.


    If you are not familiar with how to do this:

    To attach a file to your post,
    • click “Go Advanced” (next to Post Quick Reply – bottom right),
    • scroll down until you see “Manage Attachments”, click that,
    • click “Browse”.
    • select your file(s)
    • click “Upload”
    • click “Close window”
    • click “Submit Reply”
    • be sure to desensitize the data
    The file name will appear at the bottom of your reply.
    Dave

  3. #3
    Registered User
    Join Date
    07-05-2012
    Location
    New Jersey, US
    MS-Off Ver
    Excel 2010
    Posts
    57

    Re: Flexible Text Search with either VLookup or Index Match

    Please see attached.

    Thank you!
    Attached Files Attached Files

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,745

    Re: Flexible Text Search with either VLookup or Index Match

    Thank you for the upload Montoro22. It is a great help.

    At first I thought my formula was misbehaving. I finally noticed a small and subtle detail in the lookup data sheet 'CAMP KEYWORD'. "#footballifebalance" has a double l. "Find your #FootballLifeBalance" has a triple l.

    This formula is array entered in D2 and filled down. If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,745

    Re: Flexible Text Search with either VLookup or Index Match

    BTW:
    If there are multiple matches my above formula will return the first one it finds only.
    Last edited by FlameRetired; 04-12-2017 at 09:09 PM. Reason: rewording / clarity

  6. #6
    Registered User
    Join Date
    07-05-2012
    Location
    New Jersey, US
    MS-Off Ver
    Excel 2010
    Posts
    57

    Re: Flexible Text Search with either VLookup or Index Match

    Works great! Thank you.

  7. #7
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,745

    Re: Flexible Text Search with either VLookup or Index Match

    Good deal. You are welcome. Thank you for the feedback.

  8. #8
    Registered User
    Join Date
    07-05-2012
    Location
    New Jersey, US
    MS-Off Ver
    Excel 2010
    Posts
    57

    Re: Flexible Text Search with either VLookup or Index Match

    Following up here. I'm noticing that if the formula finds multiple keywords under the same campaign, it will return 'no match' rather than the campaign name.

    For example with the Holiday campaign, if the text has both 'holiday' and 'holidone' in it, it will return 'no match'. Wondering if there is a quick fix here to allow it to still return back the campaign "Holiday" in that scenario.

  9. #9
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,745

    Re: Flexible Text Search with either VLookup or Index Match

    Try array entering this in D2 and fill down.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    07-05-2012
    Location
    New Jersey, US
    MS-Off Ver
    Excel 2010
    Posts
    57

    Re: Flexible Text Search with either VLookup or Index Match

    Works like a charm, thanks again!

  11. #11
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,745

    Re: Flexible Text Search with either VLookup or Index Match

    You're welcome. Thanks for the feedback.

+ 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. Replies: 2
    Last Post: 06-29-2013, 11:58 PM
  2. Replies: 3
    Last Post: 06-17-2013, 01:09 PM
  3. vlookup? match? index? MULTIPLE criteria for vlookup search problem....
    By aborg88 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 02-11-2013, 09:56 AM
  4. Replies: 13
    Last Post: 12-13-2012, 11:44 AM
  5. [SOLVED] Search in Table vlookup / Hlookup or INDEX - MATCH command
    By dalaie in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 09-13-2012, 07:42 AM
  6. Replies: 1
    Last Post: 07-13-2011, 09:22 AM
  7. Using Search with either vlookup or match and index
    By jlowenstein in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 09-06-2005, 03:05 PM

Tags for this Thread

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