+ Reply to Thread
Results 1 to 2 of 2

vlookup partial string of cell to values

  1. #1
    Registered User
    Join Date
    10-13-2008
    Location
    Australia
    MS-Off Ver
    2007
    Posts
    85

    vlookup partial string of cell to values

    Hi All,

    I have a sheet with a bit of text in the cell (A) and want to return the item code for that cell in the next column (B). The cells I want to return from are on another sheet. So...

    Sheet1
    A B(contains formula)
    This is iron value $
    Iron charged at $
    The kettle is valued at $
    Different kettle value is$

    Sheet2
    A B
    Iron 1600789
    Kettle 2861863

    So for Sheet1 (B1:B2), I want to return 1600789. For B3:B4, I want to return 2861863. So I want to do a vlookup to match ANY of the contents in Sheet1 A1 to Sheet2 A and return B.

    I hope this makes sense. Your help is greatly appreciated.

    Cheers,

    Benno

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531
    I'm sure your real life scenario will be more complex than this but you could use something like the below in Sheet1!B1 -- entered as an array using CTRL + SHIFT + ENTER:

    Please Login or Register  to view this content.
    Then copy down.

    As mentioned pending the complexities of your real scenario this is likely to require alteration... as is it will return the associated value in Col B on Sheet2 for the FIRST match of Col A values on Sheet2 it finds in the text string in Ax on Sheet1 (where x = row number)... so a string containing BOTH Kettle & Iron would return 1600789 regardless of which "item" was listed first in the actual text string (eg "Kettle Iron" or "Iron Kettle") ... if Kettle was listed before Iron on Sheet2 it would return 2861863. I hope that makes sense.
    Last edited by DonkeyOte; 12-04-2008 at 05:29 AM.

+ 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