+ Reply to Thread
Results 1 to 8 of 8

How to use wildcards in VLOOKUP

  1. #1
    Registered User
    Join Date
    10-07-2014
    Location
    UK
    MS-Off Ver
    2013
    Posts
    4

    How to use wildcards in VLOOKUP

    Hi all,

    I'm new to VBA and this forum and was wondering if you could advise me on how to correctly use a wildcard in VLOOKUP (or an alternative approach to the below - suggestions welcome).

    I have a list of transaction descriptions in Column C. What I am trying to do is categorise these transactions based on a number of keywords. Where i am stuck is that the below code looks up the whole value of Cells in Column C and not just whether the cell CONTAINS the key word. Any ideas?

    DATA EXAMPLE

    COLUMN C (DESCRIPTION): "Bank MTG Mort. payment"
    COLUMN G (WHERE RETURN VAL. SHOULD GO): MORTGAGE
    COLUMN H (KEYWORD TO SEE IF CONTAINED IN COLUMN C'S CELL): MTG
    COLUMN I (RETURN VALUE IF "MTG" EXISTS IN COLUMN C'S CELL): MORTGAGE

    Please Login or Register  to view this content.
    Last edited by nomido14; 10-07-2014 at 06:43 PM.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: How to use wildcards in VLOOKUP

    Hi and welcome to the forum. Unfortunately your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    10-07-2014
    Location
    UK
    MS-Off Ver
    2013
    Posts
    4

    Re: How to use wildcards in VLOOKUP

    Amended as requested.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: How to use wildcards in VLOOKUP

    Hi,

    Would you upload the workbook so that we can see the request in context please.

  5. #5
    Registered User
    Join Date
    10-07-2014
    Location
    UK
    MS-Off Ver
    2013
    Posts
    4

    Re: How to use wildcards in VLOOKUP

    Hi Richard,

    Thanks for your post; didnt realise I could do that please find attached the workbook.

    Thanks.
    Attached Files Attached Files

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: How to use wildcards in VLOOKUP

    Hi,

    Try this procedure

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    10-07-2014
    Location
    UK
    MS-Off Ver
    2013
    Posts
    4

    Re: How to use wildcards in VLOOKUP

    Richard you genius!! Thank you very much!!!

  8. #8
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: How to use wildcards in VLOOKUP

    My pleasure - glad to have 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. Re: VLOOKUP and wildcards
    By cadcrew in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-11-2006, 11:35 AM
  2. using wildcards in vlookup
    By Alex in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  3. using wildcards in vlookup
    By Alex in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  4. vlookup & wildcards
    By Alex in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM
  5. [SOLVED] using wildcards in vlookup
    By Alex in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-14-2005, 12: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