+ Reply to Thread
Results 1 to 5 of 5

vlookup : match until a certain character is found

  1. #1
    Registered User
    Join Date
    01-14-2016
    Location
    manchester
    MS-Off Ver
    2013
    Posts
    7

    vlookup : match until a certain character is found

    Hi guys, im quite new to excel functions but im getting there, i have an issue at the moment that im looking for help with, heres the situation.

    i am trying to match data from a column to match data on another sheet so it returns a value and i know i have a match.

    the eg i use will be the persons name followed by their e-mail address, i have 4000 lines on the spreadsheet and cross referencing it against 2500 hits.

    im using a vlookup with false but the problem i have is that some of the data is not matching, i think it's because some of the data may have changed

    so i have for eg cooke,sam (human resources) but the data im trying to match it against is cooke,sam (hr services) iknow my lookup formula is correct as it finds 900 of the 2500, but not the rest.

    is there any way i can tell vlookup just to search up until the space and the ( to return an exact match for the first part?, or should inot be using vlookup?

    any help would be greatly appreciated.

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: vlookup : match until a certain character is found

    Try this example....

    With this list in D1:F4
    E
    F
    1
    cook,captain (navy)
    Person
    2
    cook,e. monster (muppet)
    Fictional Character
    3
    cooke,same (hr services)
    Person
    4
    cooked,goose (entrée)
    Food

    and
    A1: text to match.... cooke,sam (humar resources)

    This formula looks in the table for text that begins with the name, ignoring everything after the name
    Please Login or Register  to view this content.
    In that example, the formula returns: Person

    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: vlookup : match until a certain character is found

    Hi
    You can search for =VLOOKUP(LEFT(A2,FIND(" ",A2)), ...

  4. #4
    Registered User
    Join Date
    01-14-2016
    Location
    manchester
    MS-Off Ver
    2013
    Posts
    7

    Re: vlookup : match until a certain character is found

    thats great thanks, im sure i can have a play about with it, if it helps it's not quite as complicated as that what i am trying to do

    an exact example of what im trying to is

    Sheet 1

    A B
    1 Cooke, Sam (human resources)
    2 Jones, Jim (Technology services)
    3 James, Ray (IT Infrastructure)

    Sheet 2
    A
    1 James, Ray (Information Tecnology)
    2 Cooke, Sam (hr services)


    I want column B in sheet 1 to return the matches, i can then filter out the n/a's and see what hit and what didnt in an easy filter

    off the top of my head the formula i used in sheet 1 B is

    =VLOOKUP(A1, SHEET 2!A1:A2,1,FALSE)

    or something along those lines.

    Thanks again for your reply, i'll let you know how i get on

  5. #5
    Registered User
    Join Date
    01-14-2016
    Location
    manchester
    MS-Off Ver
    2013
    Posts
    7

    Re: vlookup : match until a certain character is found

    ok heres the exact formula i used

    =vlookup(RC[-4], 'TRISO'!R[-4]C[-7]:[R2649]C[-7], 1,FALSE)

    RC[-4] field data i want to start with

    triso and the rest is the sheet and the column i want to cross reference against.

    im putting the formula in the field on the first sheet with the data i want to start with and where i want the hits to show up.

    im getting all the ones that match exactly but all the ones where the department has changed i get n/a.

    i tried =vlookup(left(rc[-4],'triso'!r[-4]c[-7]:r[2649]c[-7]),1,false)

    and i get the VALUE errorin the return field.

    hope thats not to confusing
    Last edited by nickyboy1981; 01-14-2016 at 04:12 PM.

+ 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. [SOLVED] Macro to rename cell content based on the starting character until found same character
    By oeyandyprawira in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-19-2015, 09:36 AM
  2. [SOLVED] Vlookup function does not continue when match is not found
    By dresur in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-08-2015, 03:48 PM
  3. VLOOKUP when an exact match is not found
    By toemoss in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 03-06-2014, 06:01 PM
  4. [SOLVED] How to match values found by vlookup
    By Berean50 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-13-2013, 04:55 AM
  5. [SOLVED] need VLOOKUP to generate a zero if match not found
    By merlyn45 in forum Excel General
    Replies: 3
    Last Post: 05-10-2012, 04:23 PM
  6. Vlookup Result When No Match is Found
    By dnamertz in forum Excel General
    Replies: 6
    Last Post: 11-03-2011, 10:12 AM
  7. VLOOKUP formula returns #N/A when a match should be found
    By ExcelTip in forum Tips and Tutorials
    Replies: 1
    Last Post: 08-14-2007, 01:15 PM

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