+ Reply to Thread
Results 1 to 11 of 11

Lookup the date and return the latest value under some conditions from multiple columns

  1. #1
    Registered User
    Join Date
    06-17-2015
    Location
    singapore
    MS-Off Ver
    2010
    Posts
    43

    Lookup the date and return the latest value under some conditions from multiple columns

    Hello, Someone can help me please ?

    I am trying to work around, Sumifs,Vlookup, Index , Match, Offset , etc.. But, I couldn't figure out how to combine all these together.

    I want to get the price by looking up "invoice date" and matching "client code" and "item code" and "Quotation date" from the price list table.
    They are in the different columns . Prices are varies for one customer . Eg , 1/1/2016 price is 15 , then 1/5/2016 price is $18 . Then latest price as at 1/8/2016 is $20.

    I want to get price by looking up related date . If invoice date is 1/7/2016 , then show price is $18 . If 5/9/2016 , then show $20.

    Attached is simple file.

    Thanks in advance.
    Attached Files Attached Files

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Lookup the date and return the latest value under some conditions from multiple column

    Try array-entering this formula in M3 and filling down.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.
    Dave

  3. #3
    Registered User
    Join Date
    06-17-2015
    Location
    singapore
    MS-Off Ver
    2010
    Posts
    43

    Re: Lookup the date and return the latest value under some conditions from multiple column

    Thank you very much, Dave. This solved my problem exactly.
    Appreciate for your help ..

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Lookup the date and return the latest value under some conditions from multiple column

    You are welcome. Thank you for the feedback.

  5. #5
    Registered User
    Join Date
    06-17-2015
    Location
    singapore
    MS-Off Ver
    2010
    Posts
    43

    Re: Lookup the date and return the latest value under some conditions from multiple column

    Hello,

    I would like to ask a favor again . Formula worked perfectly if price are increased.
    But if later date is lower than earlier price , which formula should I use?

    Current formula would show the max value only , not the latest value.

    Sorry, for my missing information as I just found out there is a case like this.

  6. #6
    Registered User
    Join Date
    06-17-2015
    Location
    singapore
    MS-Off Ver
    2010
    Posts
    43

    Re: Lookup the date and return the latest value under some conditions from multiple column

    Hello,

    I would like to ask a favor again . Formula worked perfectly if price are increased.
    But if later date is lower than earlier price , which formula should I use?

    Current formula would show the max value only , not the latest value.

    Sorry, for my missing information as I just found out there is a case like this.

  7. #7
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Lookup the date and return the latest value under some conditions from multiple column

    PMH2384,

    I'm stumped.

    I'll keep working on this one.

    Maybe something simple I'm overlooking.

  8. #8
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Lookup the date and return the latest value under some conditions from multiple column

    here is how i did it....not sure its the most effective way of doing it...basically brute force matching

    used a helper column O just to shorten the formula down a bit you can combine it but the formula becomes a mammoth cause you refer to the helper so often

    CSE formula...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.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    then in column P

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  9. #9
    Registered User
    Join Date
    06-17-2015
    Location
    singapore
    MS-Off Ver
    2010
    Posts
    43

    Re: Lookup the date and return the latest value under some conditions from multiple column

    Hi Dave,

    This is amazing formula and it worked.
    I am really grateful your help and sincerely thank you for your precious time.

  10. #10
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Lookup the date and return the latest value under some conditions from multiple column

    Hi,

    I believe that's humdingaling's formula.

    Dave

  11. #11
    Registered User
    Join Date
    06-17-2015
    Location
    singapore
    MS-Off Ver
    2010
    Posts
    43

    Re: Lookup the date and return the latest value under some conditions from multiple column

    I am so sorry that I overlooked . I thought you are the one who answer my another request.
    How careless am I .

    Dear Humdingalings ,

    My apologizes.. I don't know how to say sorry to you and thanks to you.

    In sincere appreciation of your valuable help, Please accept my respect and gratitude. Thank you

+ 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: 8
    Last Post: 04-08-2015, 10:10 PM
  2. Replies: 3
    Last Post: 04-08-2014, 02:34 AM
  3. Replies: 10
    Last Post: 02-19-2013, 12:05 PM
  4. Replies: 8
    Last Post: 11-19-2012, 06:58 PM
  5. Replies: 0
    Last Post: 08-14-2012, 01:18 PM
  6. Excel 2007 : Lookup a value and return the latest date
    By pinkshirt in forum Excel General
    Replies: 4
    Last Post: 07-04-2011, 06:13 AM
  7. Lookup Latest Date Using Multiple Criteria
    By maggioant in forum Excel General
    Replies: 2
    Last Post: 01-26-2010, 04:32 AM

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