+ Reply to Thread
Results 1 to 6 of 6

Problems trying to match criteria in lookup queries

  1. #1
    Registered User
    Join Date
    08-13-2019
    Location
    Alberta, Canada
    MS-Off Ver
    365
    Posts
    3

    Problems trying to match criteria in lookup queries

    Hi all,

    First time poster, long time lurker...

    Tried all that I can think of but this seems to be not working.

    I have a data set comprised of a numbering system using MasterFormat - the numbering in my table is for example 01 10 00 or what have you and the next column is the name of that division. What I am trying to do is pull over that information in another sheet to autofill the description when I put in the MasterFormat number... vlookup will not work, best I can do is kind of get it to pull the item above the one I want, for example I want 08 00 00, it will pull 07 98 00, which I have to use approximate to do. exact just gives an error. index match just gives an error. I tried seeing if perhaps it is the formatting, tried exact command, it shows they are different. Any ideas on how to search or reorganize the data to search....

    Thanks!
    Last edited by AliGW; 08-14-2019 at 10:02 AM.

  2. #2
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Lookup (vlookup or index-match) not doing what I'd like - cannot match queries

    If the numbering in the lookup table and the lookup criteria are consistent then there is no obvoius reason why it should not work with exact match, that is of course assuming that there is a match within the table.

    Because of the format your numbers are actually text strings not proper numbers, so that could be part of the reason why approx is not working as expected.
    Also bear in mind that the lookup table will need to be sorted in ascending order for approx match to work.

    If that doesn't help then a sample workbook (with fictional data that accurately represents your real data) will be required so that we can see exactly what you have and how excel is interpreting the numbers.

    To attach a file, hit 'Go Advanced' then scroll down and look for the 'Manage Attachments' text link (not the paper clip icon, that is broken).

  3. #3
    Registered User
    Join Date
    08-13-2019
    Location
    Alberta, Canada
    MS-Off Ver
    365
    Posts
    3

    Re: Lookup (vlookup or index-match) not doing what I'd like - cannot match queries

    Here is a sample I whipped up - hope it illustrates the point. Thank you.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Lookup (vlookup or index-match) not doing what I'd like - cannot match queries

    Did you copy your data from a web page?

    The source table contains non breaking spaces, which are not the same as the space that you type with the keyboard.

    On the MFDivisions sheet, press Ctrl h

    Make sure that the 'Find What' box is completely empty, then hold the Alt key and type 0160 on the number pad (doesn't work with the numbers on the top row of the keyboard).
    Enter a normal space with the spacebar into the 'Repalce With' box, then hit 'Replace All'

    Now VLOOKUP and INDEX / MATCH should work properly with exact match.

    In D6, =LEFT([@Division],2)&" 00 00"
    In E6, =VLOOKUP([@[MF Level 1]],MFdivisions!D4:E6494,2,0)

    Hopefully you can figure out the other 2 from that, if not, shout for help

  5. #5
    Registered User
    Join Date
    08-13-2019
    Location
    Alberta, Canada
    MS-Off Ver
    365
    Posts
    3

    Talking Re: Lookup (vlookup or index-match) not doing what I'd like - cannot match queries

    Thank you! that worked wonderfully! I didn't realize the spaces were off, I had gotten the source data from someone else. I will have to add this trick to my toolbox. Thank you so much!

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,937

    Re: Lookup (vlookup or index-match) not doing what I'd like - cannot match queries

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however the thread title does not really convey what your request is about.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. As you are new here, I will do it for you this time, but next time please do it yourself.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ 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. Picture lookup using INDEX,MATCH,MACROS, VLOOKUP
    By Princessweneki in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-12-2017, 12:21 AM
  2. [SOLVED] Match-Index in stead of Index-Match lookup Array among Arrays
    By Numnum in forum Excel General
    Replies: 2
    Last Post: 10-15-2015, 02:08 PM
  3. vlookup/index-match w/ multiple lookup values
    By downey_90240 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-10-2015, 10:41 PM
  4. Replies: 6
    Last Post: 04-30-2014, 02:42 AM
  5. Dynamic or Variable Lookup array in INDEX, MATCH or VLOOKUP
    By kishor_c in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-16-2012, 09:46 AM
  6. Replies: 1
    Last Post: 08-17-2011, 06:33 PM
  7. Index / Match / Lookup / VLookup / ??? Need Help
    By sslack in forum Excel General
    Replies: 2
    Last Post: 01-31-2005, 04:18 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