+ Reply to Thread
Results 1 to 10 of 10

Match not finding a match in a table when headers are numbers.

  1. #1
    Registered User
    Join Date
    06-09-2016
    Location
    Madison, WI
    MS-Off Ver
    Office 365
    Posts
    7

    Match not finding a match in a table when headers are numbers.

    I have a table, the column headers are all numbers (pipe sizes), so the headers are whole numbers. My problem is Match will not read the table headers when they are whole numbers.

    This returns a #N/A error: match(X,Table[#Headers],0) where X is the lookup number from a referenced cell. It seems the Table using whole numbers as column headers is the problem.

    If I convert the Table to a Range this works: match(X,A1:A5,0) where X is a number or cell reference containing a number. Match works when using a Range but not using a Table, but all the numbers are the same! All I'm doing is converting the range to a table.

    Any ideas why numbers as Table Headers are a problem and how to fix?

    Thank you!
    Last edited by pxtaylor; 06-09-2016 at 08:02 PM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,628

    Re: Match not finding a match in a table when headers are numbers.

    Unless I have misunderstood, you're doing it the wrong way. The thing you are looking for comes first, then the range you are searching, and then zero (0) for an exact match.

    https://support.office.com/en-us/art...9-533f4a37673a
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    06-09-2016
    Location
    Madison, WI
    MS-Off Ver
    Office 365
    Posts
    7

    Re: Match not finding a match in a table when headers are numbers.

    Yes, sorry. The match is embedded in an =index(Table,match(X1,Table[#HeaderCol1],0),match(X2,Table[#Headers],0)) type arrangement. The second match will not find the column if the column header is a whole number. It works if I change the headers to text. For example. If X2 = "Ten" and the header column is Ten, no issue. If I change X2 = 10 the change the column header to number "10" (without quotes) it will not work.
    Last edited by pxtaylor; 06-09-2016 at 07:56 PM.

  4. #4
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Match not finding a match in a table when headers are numbers.

    sometime numbers are stored as text...check the format.
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  5. #5
    Registered User
    Join Date
    06-09-2016
    Location
    Madison, WI
    MS-Off Ver
    Office 365
    Posts
    7

    Re: Match not finding a match in a table when headers are numbers.

    I've worked out I need to convert the reference cell's number, X1=10 to a string such the formula for match is, match("X1",Table[#Headers],0) where "X1" is actually "10".
    So I need to convert the number in cell X1 to a usable string between the " " in the match formula.

  6. #6
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Match not finding a match in a table when headers are numbers.

    You cannot do that. If you put "" in X1 you just converted the cell reference X1 to text X1.
    Right click on X1 then format cell is it "General"?
    Right click on one of the header, is it "General"?

  7. #7
    Registered User
    Join Date
    12-14-2018
    Location
    Williamsport, Pennsylvania
    MS-Off Ver
    Excel 2016
    Posts
    2

    Re: Match not finding a match in a table when headers are numbers.

    I am experiencing the same issue with 2nd MATCH not finding a header entered as a number. I have toggled between General Format and Number Format for both the reference and the Header in the table to no avail.

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,628

    Re: Match not finding a match in a table when headers are numbers.

    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original. Please start a new thread - See Forum rule #4

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread

  9. #9
    Registered User
    Join Date
    12-14-2018
    Location
    Williamsport, Pennsylvania
    MS-Off Ver
    Excel 2016
    Posts
    2

    Re: Match not finding a match in a table when headers are numbers.

    I was not trying to confuse, nor was I trying to reference my own "data", I was simply trying to state that I have tried the suggested format changes in this thread with no luck. If you want me to start a new thread for the same issue I will, but that wasn't really my intent. I was hoping to just follow along and get notices when answers come up in case it gets solved.

    Sorry for any inconvenience.

  10. #10
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,628

    Re: Match not finding a match in a table when headers are numbers.

    You can follow a thread by subscribing to it. You don't have to post to it.

    No worries. But, if you want people to consider your specific issue, then you should start your own thread.

+ 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. Replies: 2
    Last Post: 01-26-2015, 04:53 AM
  2. Finding TWO numbers from a range of numbers to match a target value
    By Eero in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-18-2014, 10:08 AM
  3. vlookup for finding out wrongly spelled names and yet match the match
    By catchnanan in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-03-2014, 04:29 PM
  4. Excel 2010 headers in the table format don't match pie slices
    By Chase23 in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 08-13-2013, 08:56 PM
  5. [SOLVED] Edit Multiple Excels To Match Master Template (I.E. Table Headers, Sheet Name)
    By ub3rm0nk3y in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-30-2013, 03:23 PM
  6. Finding a match in a table
    By wnstar21 in forum Excel General
    Replies: 3
    Last Post: 07-28-2008, 02:25 PM
  7. Replies: 23
    Last Post: 07-14-2008, 10:29 PM

Tags for this Thread

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