+ Reply to Thread
Results 1 to 7 of 7

Vlookup and Large Function Not Return Correct Values

  1. #1
    Registered User
    Join Date
    02-08-2017
    Location
    Toronto
    MS-Off Ver
    2013
    Posts
    7

    Lightbulb Vlookup and Large Function Not Return Correct Values

    Hi, below first two columns is raw data set, I am trying to return Item value based on QTY.


    QTY Item results returned Formula results desired
    20 Orange Orange =VLOOKUP(LARGE(B3:B6, 1),B3:C6, 2, FALSE) Orange
    10 Apple Apple =VLOOKUP(LARGE(B3:B6, 2),B3:C6, 2, FALSE) Apple
    10 Watermelon Apple =VLOOKUP(LARGE(B3:B6, 3),B3:C6, 2, FALSE) Watermelon
    8 Kiwi Kiwi =VLOOKUP(LARGE(B3:B6, 4),B3:C6, 2, FALSE) Kiwi

    Since there are two 10s in QTY, Apple is the first item on item list with QTY 10, so excel returns Apply twice. How can I get the results desired, which is Apple for first 10, and Watermelon for second 10, instead of results returned? Thanks very much for your help in advance.

    Kevin

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,202

    Re: Vlookup and Large Function Not Return Correct Values

    "Helper" column in E

    in E2

    =B2+(COUNTIF($B$2:B2,B2)-1)*0.01

    copy down

    in D2

    =INDEX($C$2:$C$5,MATCH(LARGE($E$2:$E$5,ROWS($1:1)),$E$2:$E$5,0))

    copy down

  3. #3
    Registered User
    Join Date
    02-08-2017
    Location
    Toronto
    MS-Off Ver
    2013
    Posts
    7

    Re: Vlookup and Large Function Not Return Correct Values

    Thanks John for your quick reply, but when I pasted your formula in E2, I got #VALUE!, what is the problem here?

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,202

    Re: Vlookup and Large Function Not Return Correct Values

    See attached.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    02-08-2017
    Location
    Toronto
    MS-Off Ver
    2013
    Posts
    7

    Re: Vlookup and Large Function Not Return Correct Values

    Thanks John again, I saw attached example before and still didn't figure out how to solve my problem. My really task is to auto track Top 4 Downtime (DT) Minutes (Min) and display according DT Reason on daily basis. The DT records could reach 60 a day, and there could be same DT min with different reasons.

    To simplify the case, I just use following 6 records as example, and I want to return top 4 DT min with according DT reasons:


    Downtime Min Downtime Reason
    10 Machine
    20 Robot
    10 Network
    10 Sensor
    5 Human Error
    8 Fixture

    Using my formula above, results returned:

    20 Robot
    10 Machine
    10 Machine
    10 Machine

    What I want to see is:

    20 Robot
    10 Machine
    10 Network
    10 Sensor

    Any help would be greatly appreciated!

    Kevin

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,202

    Re: Vlookup and Large Function Not Return Correct Values

    Sorry but I don't see why it is so difficult (you can't have used my formulae) ... see attached
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    02-08-2017
    Location
    Toronto
    MS-Off Ver
    2013
    Posts
    7

    Re: Vlookup and Large Function Not Return Correct Values - SOLVED !!!

    Thanks so much John for your help, your approach and formula works great!!!

+ 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. Countif function did not return correct values
    By ceishue in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-10-2016, 03:09 PM
  2. Countif function did not return correct values
    By ceishue in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 12-10-2016, 10:38 AM
  3. vlookup function return all values
    By Gary L Brown in forum Excel Formulas & Functions
    Replies: 56
    Last Post: 09-06-2005, 08:05 PM
  4. [SOLVED] vlookup function return all values
    By Gary L Brown in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 09-06-2005, 11:05 AM
  5. [SOLVED] vlookup function return all values
    By Gary L Brown in forum Excel Formulas & Functions
    Replies: 24
    Last Post: 09-06-2005, 09:05 AM
  6. [SOLVED] vlookup function return all values
    By j2thea in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 07:05 AM
  7. [SOLVED] vlookup function return all values
    By j2thea in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM

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