+ Reply to Thread
Results 1 to 5 of 5

Vlookup or Index/Match only matching the first 8 characters.

  1. #1
    Registered User
    Join Date
    11-09-2012
    Location
    Leeds, England
    MS-Off Ver
    Excel 2010
    Posts
    3

    Vlookup or Index/Match only matching the first 8 characters.

    Hi Everyone,

    Not sure if this is possible or I will have to amend a folder filepath macro elsewhere.

    I have 8 digit references in column A (cell A2 in the non-working formula below) and on another sheet ("Link2") I want to use the 8 digit cell reference in cell A2 to look up against just the first 8 digits of "link2" column A to get the content in the cell in column B and ultimately use this as a hyperlink.

    If this were possible it would be something like this :
    =INDEX(Link2!B:B,(MATCH(A2,(left,Link2!A:A,8)0))) but it obviously doesn't work. I could use a vlookup nearest match but I can't have any margin for error.

    Is there anyway to do this ? I can't think of how this would be possible using any form of count formulas.

    Over to anyone who can think outside the box...

    Many thanks
    Last edited by CCPopsicle; 09-17-2014 at 12:02 PM.

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Vlookup or Index/Match only matching the first 8 characters.

    The syntax on your MATCH is incorrect and missing arguments, and there's too many parentheses.

    Could you attach an example or mock one up?

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic


    Perhaps you're trying to MATCH a given reference against a concatenation? INDEX(range,MATCH(ref,range,0)) is the standard format.
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  3. #3
    Valued Forum Contributor Harribone's Avatar
    Join Date
    02-24-2013
    Location
    Midlands, UK
    MS-Off Ver
    Excel 2019/365
    Posts
    570

    Re: Vlookup or Index/Match only matching the first 8 characters.

    Quick solution would be to insert a column after 'Link2' column and use the formula:

    =LEFT(A2,8)

    Then look up your result with vlookup or index/match using this column instead.
    Say thanks, click *

  4. #4
    Registered User
    Join Date
    11-09-2012
    Location
    Leeds, England
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Vlookup or Index/Match only matching the first 8 characters.

    Daffodil 11,

    I've included a mock up of the scenario.

    I was aware the index match I suggested was wrong, I was trying to emulate what it was I wanted to achieve.

    I wanted to know if there was a way to vlookup or index/match the 8 digit property code in the 1st sheet as an exact match to only the first 8 characters of the filename in the Link2 page.

    Harribone, I had thought of using that but I ended up amending a macro to give me a left,8 of the directory fiepath name. It does however slow the macro down considerably and I was hoping to have it auto-run on opening.
    Attached Files Attached Files

  5. #5
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Vlookup or Index/Match only matching the first 8 characters.

    D2:

    =LOOKUP(2,1/ISNUMBER(SEARCH(A2,'Link 2'!$A$3:$A$6)),'Link 2'!$B$3:$B$6)

    And copy downwards
    Last edited by daffodil11; 09-18-2014 at 10:23 AM. Reason: Cut by Occam's Razor

+ 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] Vlookup matching first x characters, showing up as #N/A
    By jager in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-14-2013, 12:12 AM
  2. Replies: 13
    Last Post: 12-13-2012, 11:44 AM
  3. Trouble with Index/Match and/or Vlookup and mutliple column matching
    By eralford in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-03-2012, 08:32 AM
  4. Replies: 4
    Last Post: 05-24-2012, 06:44 AM
  5. Index/ Match - error on letter characters
    By mikera in forum Excel General
    Replies: 2
    Last Post: 09-15-2011, 09:04 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