+ Reply to Thread
Results 1 to 6 of 6

Lookup latest date based on criteria (no arrays)

  1. #1
    Registered User
    Join Date
    04-25-2015
    Location
    Ontario, Canada
    MS-Off Ver
    2016
    Posts
    72

    Lookup latest date based on criteria (no arrays)

    In the attached workbook, I would like to return the latest date for Fruit Deliveries from the Fruit Deliveries worksheet onto the Fruit Order tab based on the Sales Order criteria.

    Right now, if I had a working formula, D2 would read "01/2020" as that is the latest date that we are receiving apples that are allocated to Sales Order 10.

    The date format is what our ERP provides.

    This is someone else's sheet and for some reason I cannot use array formulas (other options like Conditional Formatting are also greyed out), so I need to avoid arrays.

    Right now I am sorting the entire dataset by date descending so the index/match picks up the first result which is the latest, but my team reads these sheets earliest to latest so that's not a longterm solution.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,790

    Re: Lookup latest date based on criteria (no arrays)

    Put real dates in your example
    not texts
    A
    B
    C
    D
    E
    1
    Material Sales Order Fruit Delivery Fruit Delivery
    2
    Apples
    10
    4/9/2019
    3
    Apples
    10
    5/1/2019
    4
    Apples
    10
    1/1/2020
    5
    Apples
    10
    5/1/2019


    A
    B
    C
    D
    1
    Name Material Sales Order Fruit Delivery
    2
    John's Market Apples
    10
    1/1/2020
    3
    John's Market Pears
    20
    4
    John's Market Apples
    30
    5
    John's Market Cherries
    40


    Fruit Orders

    D2=IFERROR(AGGREGATE(14,6,('Fruit Deliveries'!$C$2:$C$5)/('Fruit Deliveries'!$A$2:$A$5='Fruit Orders'!$B2)/('Fruit Deliveries'!$B$2:$B$5='Fruit Orders'!$C2),1),"")

    copy down
    Last edited by CARACALLA; 09-18-2019 at 04:09 PM.

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

    Re: Lookup latest date based on criteria (no arrays)

    Do you wish to avoid array formula to avoid Cntrl + Shift + Enter or is there another reason?

    Banking on the answer is "Yes" try this
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Dave

  4. #4
    Registered User
    Join Date
    04-25-2015
    Location
    Ontario, Canada
    MS-Off Ver
    2016
    Posts
    72

    Re: Lookup latest date based on criteria (no arrays)

    Quote Originally Posted by CARACALLA View Post
    Put real dates in your example
    Trying to avoid this as the given format is what the ERP provides, and the person using the sheet will struggle with remembering to run the text to columns function.

    Quote Originally Posted by FlameRetired View Post
    Do you wish to avoid array formula to avoid Cntrl + Shift + Enter or is there another reason?

    Banking on the answer is "Yes" try this
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    For some reason, this sheet has some type of protection or rule which is stopping me from using an array (no change after control+shift+enter). I use them often in my own work but this is someone else's shared sheet so I don't know why it's locked down.

    I will give that formula a try today, thanks! If all is good, I will let you know and bump your rep.

  5. #5
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,790

    Re: Lookup latest date based on criteria (no arrays)

    A
    B
    C
    D
    1
    Material Sales Order Fruit Delivery Date Delivery
    2
    Apples
    10
    49/2019
    2/18/2019
    3
    Apples
    10
    50/2019
    2/19/2019
    4
    Apples
    10
    01/2020
    1/1/2020
    5
    Apples
    10
    51/2019
    2/20/2019


    A
    B
    C
    D
    1
    Name Material Sales Order Fruit Delivery
    2
    John's Market Apples
    10
    1/1/2020
    3
    John's Market Pears
    20
    4
    John's Market Apples
    30
    5
    John's Market Cherries
    40


    Fruit Deliveries

    D2=IF(C2<>"",DATE(RIGHT(C2,4),1,LEFT(C2,2)),"") copy down change Erp date in Excel date


    Fruit Orders



    D2=IF('Fruit Orders'!$B2<>"",IFERROR(AGGREGATE(14,6,('Fruit Deliveries'!$D$2:$D$100)/('Fruit Deliveries'!$A$2:$A$100='Fruit Orders'!$B2)/('Fruit Deliveries'!$B$2:$B$100='Fruit Orders'!$C2),1),""),"")

    copy down

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

    Re: Lookup latest date based on criteria (no arrays)

    Quote Originally Posted by dbl_dbl View Post

    For some reason, this sheet has some type of protection or rule which is stopping me from using an array (no change after control+shift+enter). I use them often in my own work but this is someone else's shared sheet so I don't know why it's locked down.

    I will give that formula a try today, thanks! If all is good, I will let you know ...
    That appears to have been directed to me. The formula I posted does not require CSE.

    From what you describe about the old formula it sounds like someone committed the entire range at once CSE. If you are not aware of it committing CSE in that manner will produce the behavior you describe. Do you know how to undo that type of "lock down"? Please let me 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. [SOLVED] lookup based on latest date
    By jw01 in forum Excel General
    Replies: 2
    Last Post: 03-11-2019, 04:51 PM
  2. Latest Date Based on Multiple Criteria
    By amycat81178 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-01-2018, 05:01 PM
  3. [SOLVED] Lookup latest date with multiple criteria
    By adsako in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 09-22-2018, 06:29 AM
  4. Need Latest Date Based on Criteria Help
    By amycat81178 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-25-2018, 01:19 PM
  5. [SOLVED] Lookup latest date in a table based on 2 criteria
    By mariannehislop in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 07-29-2015, 04:21 AM
  6. Pull Latest Date 2 Criteria Lookup
    By erock24 in forum Excel General
    Replies: 2
    Last Post: 08-25-2014, 09:47 PM
  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