+ Reply to Thread
Results 1 to 5 of 5

Vlookup to search for part of a string?

  1. #1
    Forum Contributor tangcla's Avatar
    Join Date
    06-04-2008
    Location
    Melbourne, Australia
    MS-Off Ver
    2010
    Posts
    136

    Vlookup to search for part of a string?

    If I have a store number (say 1234) and I am trying to search for something which contains 1234 (i.e. the whole string of ABCD1234, ABCD1235, ABCD1236 etc) is it possible to do this in one VLOOKUP formula?

    One way of doing it would be to VLOOKUP("ABCD"&"1234",....) but I would rather do it the other way around, to prevent the formula from not working.
    Last edited by tangcla; 11-17-2008 at 11:17 PM.

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

    =VLOOKUP("*1234",....)
    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 Contributor tangcla's Avatar
    Join Date
    06-04-2008
    Location
    Melbourne, Australia
    MS-Off Ver
    2010
    Posts
    136
    Quote Originally Posted by NBVC View Post
    Try something like:

    =VLOOKUP("*1234",....)
    I should also have added that 1234 will be a cell reference - so *A2 won't work.

    However, I was playing with it, and "*"&A2 works...!
    Last edited by tangcla; 11-17-2008 at 11:23 PM. Reason: Silly typo

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Quote Originally Posted by tangcla View Post
    I should also have added that 1234 will be a cell reference - so *A2 won't work.

    However, I was playing with it, and "*"A2 works...!
    That would be "*"&A2

  5. #5
    Forum Contributor tangcla's Avatar
    Join Date
    06-04-2008
    Location
    Melbourne, Australia
    MS-Off Ver
    2010
    Posts
    136
    Quote Originally Posted by NBVC View Post
    That would be "*"&A2
    Err yes that's what I meant

+ 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