+ Reply to Thread
Results 1 to 6 of 6

index match formatting issue

  1. #1
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    index match formatting issue

    I am trying to index/match data from a waste code database in an effort to providing a guide for making decisions on correct waste code choice. I downloaded the database from the web but whatever formatting was used I cannot get index match functions to work without physically typing over the entries in the code column

    the reasoning i want to explain is that these codes derive from source areas and materials can have different codes depending on source -
    the first two numbers = source
    second two numbers = sub category
    third two numbers = product

    any pointers in either changing formatting or rewriting of formulas appreciated (text to columns will not work for some reason)

    please see attached workbook
    Attached Files Attached Files
    Last edited by nigelog; 11-23-2016 at 12:33 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,067

    Re: index match formatting issue

    The reason could be your index range, 15 for example, is a numeric number, vs the match 15, is a text. Thus it's not giving you a match.

    Another reason is due to trailing spaces. For example in your example of cell G9, 17 08 does not have space, but in your index range, 17 08 is with a trailing space.
    Last edited by dluhut; 11-22-2016 at 01:08 PM.

  3. #3
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: index match formatting issue

    i see, so i need to remove all non required spaces from the end of both. Can I trim right to last character?

    i used trim to sort data area which sorted some, will look more ta for pointer
    Last edited by nigelog; 11-22-2016 at 01:23 PM.

  4. #4
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,067

    Re: index match formatting issue

    Quote Originally Posted by nigelog View Post
    i see, so i need to remove all non required spaces from the end of both. Can I trim right to last character?
    Yes you're right. TRIM should work.

    Besides TRIM, you have to make sure that your INDEX range, is in text...for example from 10 to 20 onwards, those are numeric.

  5. #5
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,835

    Re: index match formatting issue

    I don't know that I have a solid recommendation. Observations:

    1) Re: The #N/A error in H5. The lookup value in E5 is the text string "15" (the output of a TRIM() function is text). The value in AE671 (the value I expect is supposed to match "15") is the number 15. The number 15 and the text string "15" are not equal to Excel. H4 correctly finds "10", because the "10" in AE370 is also a "number stored as text", and Excel correctly recognizes the match.
    2) Re: The #N/A error in I9. The lookup value in G9 is "17 08". The value in AE810 is "17 08 " (note the trailing space). Obviously these text strings are not equal, so no match is recognized.

    There are probably several different solutions. I might start by looking at the importation step for the data in AE:AG. See if there is a better way to force all the numbers to import as text and not numbers. Post-importation, I might try a formula like =TRIM(AE3) copied down in an adjacent column (maybe AH), which will convert numbers to text and get rid of the trailing space that is common in the entries in AE. Then use this column in the MATCH() function. Or some other possibility. Whatever it takes to make sure that the lookup values in column E, F, and G are actually present in the lookup table.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  6. #6
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: index match formatting issue

    A combination of both your pointers. I did end up re-importing the data and tidying all works fine. Thanks

    Next stage is a userform to seach same database using wildcards to try to guide staff in their choice of waste code

+ 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. Issue: Only returning 1st match on Index/Match
    By tbr2891 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-21-2014, 11:54 AM
  2. Formatting issue disrupting vlookup/ index match
    By coconutshake in forum Excel General
    Replies: 7
    Last Post: 08-22-2014, 07:41 AM
  3. [SOLVED] index and match issue
    By BusiMan in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 07-30-2014, 08:23 PM
  4. [SOLVED] Match Issue - Consolidate Columns of Data With Match/Index/etc?
    By excelsior123 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-03-2014, 05:14 PM
  5. [SOLVED] Index and Match - VBA - Issue
    By Vinod Krishna.C in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-26-2014, 07:49 AM
  6. [SOLVED] Index/Match Issue
    By greggpetersen75 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-19-2013, 11:12 PM
  7. [SOLVED] index match issue
    By jw01 in forum Excel General
    Replies: 3
    Last Post: 07-19-2012, 12:31 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