+ Reply to Thread
Results 1 to 4 of 4

lookup with condition

Hybrid View

  1. #1
    Registered User
    Join Date
    12-09-2017
    Location
    VIet nam
    MS-Off Ver
    2016
    Posts
    11

    lookup with condition

    Hi all,

    I would like to find a way using vlookup for the newest price as below.
    But Vlookup always return the first value on the table.
    Kindly help me to solve it
    Thanks



    imagec404d.png
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,586

    Re: lookup with condition

    In B11 copied down:

    =LOOKUP(2,1/(($A$2:$A$7=A11)*($C$2:$C$7=MAXIFS($C$2:$C$7,$A$2:$A$7,A11))),$B$2:$B$7)
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: lookup with condition

    In B11

    =SUMIFS($B$2:$B$7,$C$2:$C$7,MAX(INDEX(($A$2:$A$7=$A11)*$C$2:$C$7,0),0),$A$2:$A$7,$A11)


    Copy down
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  4. #4
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,650

    Re: lookup with condition

    In general, is the last model always the newest?

    Try:

    =LOOKUP(2,1/($A$2:$A$7=A11),$B$2:$B$7)
    Quang PT

+ 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. [SOLVED] If condition and lookup
    By TiagoDias in forum Excel Programming / VBA / Macros
    Replies: 27
    Last Post: 12-21-2017, 05:57 AM
  2. Lookup value when certain condition met
    By ELJIWA in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-03-2017, 09:49 AM
  3. Lookup condition
    By hanif in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-07-2015, 11:00 AM
  4. multi condition format? lookup and date condition valid for.
    By D_Rennie in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-13-2009, 11:37 AM
  5. Lookup using condition
    By shabbir in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-20-2008, 10:34 PM
  6. [SOLVED] Sumproduct - Condition based on lookup of a Lookup
    By Hari in forum Excel General
    Replies: 13
    Last Post: 05-31-2006, 04:30 AM
  7. condition Lookup help
    By Paul T in forum Excel General
    Replies: 6
    Last Post: 07-24-2005, 01:05 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