+ Reply to Thread
Results 1 to 31 of 31

VLOOKUP and INDEX MATCH not working all the time / Intermittant results

  1. #1
    Registered User
    Join Date
    10-23-2018
    Location
    Cheshire
    MS-Off Ver
    2016
    Posts
    11

    VLOOKUP and INDEX MATCH not working all the time / Intermittant results

    So I have a range of data, some are high values that are good and some are low so I am using VLOOKUP / INDEX MATCH to score the values against a scoring system but they only work half the time.

    Also It seems that Excel has trouble recognising <=30 or >=30 type operators?

    I wondered if anyone could help? Many Thanks!

  2. #2
    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
    81,103

    Re: VLOOKUP and INDEX MATCH not working all the time / Intermittant results

    Welcome to the forum!

    Both functions work perfectly IF they are set up correctly. You will need to share a sample workbook with us.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    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.

  3. #3
    Registered User
    Join Date
    10-23-2018
    Location
    Cheshire
    MS-Off Ver
    2016
    Posts
    11

    Re: VLOOKUP and INDEX MATCH not working all the time / Intermittant results

    Okay many thanks! I have attached the spreadsheet, I have a scoring system on the same page also in the tab labelled Data. You will see the first tab is the results and the second tab under gradings, I am using formulas (VLOOKUP and INDEX MATCH) to use those scoring systems to fetch a value between 0-10 only. This is so I can then make radar charts and add up scores for my test samples A-G.

    Have a look, see what you think?

    Many Thanks
    Attached Files Attached Files

  4. #4
    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
    81,103

    Re: VLOOKUP and INDEX MATCH not working all the time / Intermittant results

    Where am I looking for the formulae??? Please give the tab name and cell references.

  5. #5
    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
    81,103

    Re: VLOOKUP and INDEX MATCH not working all the time / Intermittant results

    OK - found them.

    When you are using either VLOOKUP or INDEX MATCH with an approximate lookup (i.e. with 1 or TRUE in the formula), you need to have the lookup data arranged in ASCENDING order. Yours is in DESCENDING order, which is why it's not working properly.

  6. #6
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,239

    Re: VLOOKUP and INDEX MATCH not working all the time / Intermittant results

    One immediate observation, if you use 1 as the match type argument with MATCH, the table must be sorted in ascending order, not descending. You'd use -1 for a table in descending order.
    Remember what the dormouse said
    Feed your head

  7. #7
    Registered User
    Join Date
    10-23-2018
    Location
    Cheshire
    MS-Off Ver
    2016
    Posts
    11

    Re: VLOOKUP and INDEX MATCH not working all the time / Intermittant results

    Really? Is that it? Thank you so much, I will try this. Such a small thing haha! I will try this!

  8. #8
    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
    81,103

    Re: VLOOKUP and INDEX MATCH not working all the time / Intermittant results

    Yes - that's it.

    Let us know how you get on.

  9. #9
    Registered User
    Join Date
    10-23-2018
    Location
    Cheshire
    MS-Off Ver
    2016
    Posts
    11

    Re: VLOOKUP and INDEX MATCH not working all the time / Intermittant results

    Quote Originally Posted by rorya View Post
    One immediate observation, if you use 1 as the match type argument with MATCH, the table must be sorted in ascending order, not descending. You'd use -1 for a table in descending order.
    Ahh okay, thank you.

  10. #10
    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
    81,103

    Re: VLOOKUP and INDEX MATCH not working all the time / Intermittant results

    What Rory has said is true, but won't work with VLOOKUP, so you'd have to convert all formulae to INDEX MATCH.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  11. #11
    Registered User
    Join Date
    10-23-2018
    Location
    Cheshire
    MS-Off Ver
    2016
    Posts
    11

    Re: VLOOKUP and INDEX MATCH not working all the time / Intermittant results

    Im just going to make sure they are all in ascending order, I will report back to see if it works. Many Thanks! Ive been doing this for days trying to solve this haha!

  12. #12
    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
    81,103

    Re: VLOOKUP and INDEX MATCH not working all the time / Intermittant results

    Should have joined sooner!!!

    By the way, please don't quote whole posts, especially when you are responding to the one immediately preceding your own - it's just clutter. It's OK to quote if you are responding to a post out of sequence, but limit quoted content to a few relevant lines that makes clear to whom and what you are responding. Thanks!

    For normal conversational replies, try using the QUICK REPLY box below.

  13. #13
    Registered User
    Join Date
    10-23-2018
    Location
    Cheshire
    MS-Off Ver
    2016
    Posts
    11

    Re: VLOOKUP and INDEX MATCH not working all the time / Intermittant results

    So with my scoring system, one will always be ascending and the other will always be descending, or at least sometimes. Which needs to be ascending? The grading system that I need to get a value back from?

  14. #14
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,239

    Re: VLOOKUP and INDEX MATCH not working all the time / Intermittant results

    The lookup table needs to be sorted appropriately (on the first column for a VLOOKUP or the MATCH column, as applicable).

  15. #15
    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
    81,103

    Re: VLOOKUP and INDEX MATCH not working all the time / Intermittant results

    I have been informed that you have cross-posted this same request here: https://www.mrexcel.com/forum/excel-...t-results.html

    Please read our forum rules before opening another thread here: cross-posting is not forbidden, but if you do it, you MUST let us know when you open the thread (the same rule applies at Mr Excel). Thank you.

  16. #16
    Registered User
    Join Date
    10-23-2018
    Location
    Cheshire
    MS-Off Ver
    2016
    Posts
    11

    Re: VLOOKUP and INDEX MATCH not working all the time / Intermittant results

    Sorry guys just marked this as unsolved as I still need a bit more clarification, thanks for all your help.

    So 1. transfer all VLOOKUP functions to Index Match...

    2. Transfer the scoring data to ascending - this is the bit I am unsure about as many data will be ascending whilst the scoring system will be descending, is it only the scoring system that needs to be ascending or will putting -1 on Index Match solve this and mitigate it?

    3. Is that all that is needed? Thanks!

    Thanks!

  17. #17
    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
    81,103

    Re: VLOOKUP and INDEX MATCH not working all the time / Intermittant results

    Please confirm that you have read and understood post #15 before we proceed.

  18. #18
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,239

    Re: VLOOKUP and INDEX MATCH not working all the time / Intermittant results

    If your lookup table is sorted descending, then use -1.

  19. #19
    Registered User
    Join Date
    10-23-2018
    Location
    Cheshire
    MS-Off Ver
    2016
    Posts
    11

    Re: VLOOKUP and INDEX MATCH not working all the time / Intermittant results

    I cross posted as I was unsure if I would get replies / how long it would take and was unfamiliar with the forums. I probably wont cross post again as the other forum does not allow me to post attachments. Thanks.

  20. #20
    Registered User
    Join Date
    10-23-2018
    Location
    Cheshire
    MS-Off Ver
    2016
    Posts
    11

    Re: VLOOKUP and INDEX MATCH not working all the time / Intermittant results

    Quote Originally Posted by AliGW View Post
    Please confirm that you have read and understood post #15 before we proceed.
    Yes understood.

  21. #21
    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
    81,103

    Re: VLOOKUP and INDEX MATCH not working all the time / Intermittant results

    Deleted - misleading information - sorry!
    Last edited by AliGW; 10-23-2018 at 11:52 AM.

  22. #22
    Registered User
    Join Date
    10-23-2018
    Location
    Cheshire
    MS-Off Ver
    2016
    Posts
    11

    Re: VLOOKUP and INDEX MATCH not working all the time / Intermittant results

    So index column is ascending (grade array), Match column (lookup_array) is descending , using a value of -1 gives me N/A and using a value of 1 gives me zero when the answer should be 7. Thanks for your help by the way.

  23. #23
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,239

    Re: VLOOKUP and INDEX MATCH not working all the time / Intermittant results

    Is your lookup value greater than the first value in the Match column?

  24. #24
    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
    81,103

    Re: VLOOKUP and INDEX MATCH not working all the time / Intermittant results

    Actually, I've been misleading you - sorry.

    You MUST have the lookup array in ascending order.

    Excel 2016 (Windows) 32 bit
    B
    C
    D
    E
    F
    2
    Score Grade Lookup Value Grade
    3
    7.5
    B
    0
    U
    4
    1
    D
    5
    2
    D
    6
    4
    C
    7
    6
    B
    8
    8
    A
    9
    10
    A*
    Sheet: Sheet1

    Excel 2016 (Windows) 32 bit
    C
    3
    =INDEX($F$3:$F$9,MATCH(B3,$E$3:$E$9,1))
    Sheet: Sheet1

    The -1 is to do with the way the lookup is done, not the order of the lookup array.

  25. #25
    Registered User
    Join Date
    10-23-2018
    Location
    Cheshire
    MS-Off Ver
    2016
    Posts
    11

    Re: VLOOKUP and INDEX MATCH not working all the time / Intermittant results

    Okay thank you, I will have a look and sort this out. Many Thanks AliGW.

  26. #26
    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
    81,103

    Re: VLOOKUP and INDEX MATCH not working all the time / Intermittant results

    From the MS Office support page:

    1 or omitted - MATCH finds the largest value that is less than or equal to lookup_value. The values in the lookup_array argument must be placed in ascending order, for example: ...-2, -1, 0, 1, 2, ..., A-Z, FALSE, TRUE.
    0 - MATCH finds the first value that is exactly equal to lookup_value. The values in the lookup_array argument can be in any order.
    -1 - MATCH finds the smallest value that is greater than or equal tolookup_value. The values in the lookup_array argument must be placed in descending order, for example: TRUE, FALSE, Z-A, ...2, 1, 0, -1, -2, ..., and so on.

    To be honest the -1 argument has never worked as it should when I've tried to use it, so I would advise always arranging your lookup values in ascending order.

  27. #27
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,239

    Re: VLOOKUP and INDEX MATCH not working all the time / Intermittant results

    That's not correct. If you use -1 with MATCH the lookup table must be sorted in descending order.

  28. #28
    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
    81,103

    Re: VLOOKUP and INDEX MATCH not working all the time / Intermittant results

    Please mark the thread as solved.

  29. #29
    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
    81,103

    Re: VLOOKUP and INDEX MATCH not working all the time / Intermittant results

    Quote Originally Posted by rorya View Post
    That's not correct. If you use -1 with MATCH the lookup table must be sorted in descending order.
    Yes, but it doesn't work as the OP wants or needs. That's the point.

  30. #30
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,239

    Re: VLOOKUP and INDEX MATCH not working all the time / Intermittant results

    I was taking issue with your comment "The -1 is to do with the way the lookup is done, not the order of the lookup array."

  31. #31
    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
    81,103

    Re: VLOOKUP and INDEX MATCH not working all the time / Intermittant results

    Yes, I know.

+ 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: 1
    Last Post: 05-13-2018, 05:32 AM
  2. Multiple results by using vlookup / Index & Match
    By fmoiduf in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-16-2017, 06:33 AM
  3. please help! vlookup / index-match not working
    By ferday in forum Excel General
    Replies: 2
    Last Post: 06-07-2016, 04:17 PM
  4. [SOLVED] Concatenate Multiple Vlookup/Index/Match Results with Commas
    By mkay13 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-29-2015, 02:04 PM
  5. Index/Match or VLookup returning Multiple Results
    By Stoppeh in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-21-2014, 08:31 PM
  6. [SOLVED] Intermittant #N/A error in nested vlookup index formula that shouldn't occur
    By DPKologie in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-01-2012, 04:25 PM
  7. [SOLVED] Vlookup & Hlookup at same time - Why is this Index+Match formula not working
    By fabrice.usa in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-24-2012, 06:46 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