+ Reply to Thread
Results 1 to 11 of 11

VLOOKUP display only oldest date?

  1. #1
    Registered User
    Join Date
    10-06-2019
    Location
    Netherlands
    MS-Off Ver
    Version 15.13.3
    Posts
    16

    VLOOKUP display only oldest date?

    I have an excel sheet where batches consist of 2 or more raw materials with each a serial number. Those serial numbers have each their own expiry date. I want the final expiry date (column D) based on the oldest expiry date of the raw materials.

    For example: batch 1 has 25635 (expiry date 11-2019) and 12345 (expiry date 07-2019). I want that column D shows only the oldest expiry date, which is in this case 07-2019

    How do I do that? (the excel sheet is in the attachment)
    Attached Files Attached Files

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,613

    Re: VLOOKUP display only oldest date?

    You may use such Array formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    But the dates in column L shall be dates, not texts. See in attached file how is a date formatted with custom format to display only month and year

    **Array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. (on Mac I think it is CTRL + SHIFT + RETURN). If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).
    Attached Files Attached Files
    Best Regards,

    Kaper

  3. #3
    Registered User
    Join Date
    10-06-2019
    Location
    Netherlands
    MS-Off Ver
    Version 15.13.3
    Posts
    16

    Re: VLOOKUP display only oldest date?

    Thank you!!

  4. #4
    Registered User
    Join Date
    10-06-2019
    Location
    Netherlands
    MS-Off Ver
    Version 15.13.3
    Posts
    16

    Re: VLOOKUP display only oldest date?

    Just one more question, how can you make this work with merged cells?

    For example, for the selected cell in the attachment, the code should refer to F3:I4, since F3:F5 is a merged cell, but that doesn't work. And if you do F4:I4, it ignores the expiry date of F3:F5 cell

    Attachment 677726

  5. #5
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,535

    Re: VLOOKUP display only oldest date?

    Selecting Attachment 677726 results in the following message: "Invalid Attachment specified. If you followed a valid link, please notify the administrator"
    To show an example of the issue please utilize the instructions in the banner at the top of the page.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  6. #6
    Registered User
    Join Date
    10-06-2019
    Location
    Netherlands
    MS-Off Ver
    Version 15.13.3
    Posts
    16

    Re: VLOOKUP display only oldest date?

    Attachment 678066

    How about now?

  7. #7
    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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: VLOOKUP display only oldest date?

    There are instructions at the top of the page explaining how to attach your sample workbook.

    You have a Mac, so I am moving this thread to the Other Platforms section.

    Oh, and DON'T USE MERGED CELLS!!!! Don't put form before function.
    Last edited by AliGW; 05-17-2020 at 03:33 AM.
    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.

  8. #8
    Registered User
    Join Date
    10-06-2019
    Location
    Netherlands
    MS-Off Ver
    Version 15.13.3
    Posts
    16

    Re: VLOOKUP display only oldest date?

    I have now the excel sheet attached
    Attached Files Attached Files

  9. #9
    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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: VLOOKUP display only oldest date?

    Had a look - the advice stands: don't use merged cells.

  10. #10
    Registered User
    Join Date
    10-06-2019
    Location
    Netherlands
    MS-Off Ver
    Version 15.13.3
    Posts
    16

    Re: VLOOKUP display only oldest date?

    Allright, thanks, haha

  11. #11
    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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: VLOOKUP display only oldest date?

    No problem.

+ 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: 0
    Last Post: 12-22-2019, 02:56 PM
  2. Select columns, compare dates and display column title with oldest date
    By rluesc in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 01-03-2016, 03:47 PM
  3. Find oldest entry and display its column title
    By rluesc in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-28-2015, 08:52 AM
  4. Display the top 10 oldest records
    By scottmoss in forum Excel General
    Replies: 4
    Last Post: 06-06-2011, 11:31 AM
  5. Display Date and Time of oldest item in Mailbox
    By fcomino in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-30-2010, 12:11 AM
  6. Display value based on oldest date and other criteria.
    By Permagrin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-03-2009, 09:48 AM
  7. Replies: 3
    Last Post: 02-26-2009, 04:28 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