+ Reply to Thread
Results 1 to 5 of 5

Match or Lookup and using left

  1. #1
    Registered User
    Join Date
    08-24-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    26

    Match or Lookup and using left

    So I have to take data from one sheet and some how match or lookup customer number and return it to another sheet. I have attached a example so you guys can see what I am talking about. I need to come up with a formula to take customer number from sheet two and match the number to customer # on Sheet 1. Haven't messed around with it just figure I would check here first. Also I need to use a Left command in the formula to only search a certain number of characters. Any help would be great thanksExample.xlsx

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,454

    Re: Match or Lookup and using left

    Hi,

    In B2 on sheet1

    =INDEX('Sheet 2'!$B$2:$B$27,MATCH(TRIM(Sheet1!C2),'Sheet 2'!$C$2:$C$27,0))

    copied down.

    Note I have added the trim function to accommodate trailing spaces.
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Registered User
    Join Date
    08-24-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: Match or Lookup and using left

    what value do I need to change if I only want to do the match for left 5 characters so on. thanks formula works great.

  4. #4
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Match or Lookup and using left

    This one will get you more results

    =IFERROR(VLOOKUP(LEFT(C2,12)&"*",CHOOSE({1,2},('Sheet 2'!$C$2:$C$27),'Sheet 2'!$B$2:$B$27),2,0),"Not Found")

    Or you can modify formula suggested by sweep:

    =IFERROR(INDEX('Sheet 2'!$B$2:$B$27,MATCH(LEFT(C2,12)&"*",'Sheet 2'!$C$2:$C$27,0)),"Not Found")
    Last edited by AlKey; 09-26-2014 at 09:15 AM.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  5. #5
    Registered User
    Join Date
    08-24-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: Match or Lookup and using left

    Thanks very much is there something I need to change in the formula if I am referencing numbers??

+ 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. Partial match using LEFT() in combination with MATCH
    By bluerabbit in forum Excel Formulas & Functions
    Replies: 19
    Last Post: 04-16-2013, 01:13 AM
  2. [SOLVED] Left Function in Combination with IF, LOOKUP, MATCH, or INDEX?
    By superwhoever in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 10-29-2012, 01:31 AM
  3. lookup or match with left & right
    By micope21 in forum Excel General
    Replies: 9
    Last Post: 11-12-2011, 08:31 AM
  4. Using Lookup instead of Index/Match for left lookup
    By teylyn in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-07-2008, 09:20 PM
  5. Lookup to the left
    By andrewc in forum Excel General
    Replies: 2
    Last Post: 06-18-2008, 06:21 AM

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