+ Reply to Thread
Results 1 to 2 of 2

want to get Maximum and Minimum value of selected codes using vlookup & MAX

  1. #1
    Registered User
    Join Date
    10-12-2017
    Location
    Dhaka
    MS-Off Ver
    2007
    Posts
    9

    Lightbulb want to get Maximum and Minimum value of selected codes using vlookup & MAX

    Hi,

    I need to get maximum and minimum value of selected codes. Used max&vlookup but it provides wrong result as shown in attached file.

    need help to get correct result

    Code Price Code for Max Max Should be
    101212 55 101212 55 60
    101212 60 101212 55 60
    101212 12 101212 55 60
    101213 16 101213 16 50
    101213 40 101213 16 50
    101213 50 101213 16 50
    101213 30 101213 16 50
    101215 78 101215 78 80
    101215 80 101215 78 80

    Formula was:
    MAX(VLOOKUP(C2,$A$1:$B$17,2,FALSE))
    Last edited by khaiberians; 08-07-2019 at 04:36 AM.
    Regards,

    Arif

  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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,421

    Re: want to get Maximum and Minimum value of selected codes using vlookup & MAX

    Try this:

    =MAX(IF($A$1:$A$17=C2,$B$1:$B$17))

    ... confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

    VLOOKUP will return the first match regardless - it cannot be coerced in the way you tried.
    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. Minimum and maximum IF help
    By Dawndinosaur in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-28-2016, 12:58 AM
  2. maximum / minimum in solver
    By ruecel in forum Excel General
    Replies: 3
    Last Post: 09-02-2015, 08:08 AM
  3. Minimum and maximum
    By ikke88 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-06-2015, 04:09 AM
  4. [SOLVED] Maximum and Minimum between two dates
    By thilag in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-13-2015, 01:26 AM
  5. [SOLVED] Sum minus up to a maximum and a minimum
    By Rompetelo in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-18-2013, 03:58 AM
  6. Maximum and Minimum
    By lurchybold in forum Excel General
    Replies: 6
    Last Post: 10-13-2010, 11:04 AM
  7. [SOLVED] Recording maximum and minimum
    By F in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-18-2006, 02:30 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