+ Reply to Thread
Results 1 to 5 of 5

Return oldest date in range when a file is open

  1. #1
    Registered User
    Join Date
    02-05-2016
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    3

    Return oldest date in range when a file is open

    Hi,

    I'm setting up a spreadsheet to keep track of case files within our office.
    I'm having trouble with one formula. I want it to display the "Oldest open file." In other words, to return the oldest date in a column ("Date all docs received"), but to ignore closed files (where a date is present in the "file closed" column).

    I have tried to array enter this:

    =MIN(IF(Michael!K2:K999=0, Michael!C2:C999))

    Which returns "1900-01-00". My theory is that the formula is treating all the blank cells as zero, which reverts to 1900-01-00 when formatted as a date.

    How can I get the formula to ignore the blank cells from the MIN calculation?
    OR, is there a better formula to use?

    Thank you.Mediation Tracking Feb-05-2016.xlsx

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,178

    Re: Return oldest date in range when a file is open

    Try

    =MIN(IF((Michael!J2:J999=0)*(Michael!C2:C999>0),Michael!C2:C999))

    Enter with Ctrl+Shift+enter

    The "*" is an AND condition in this formula

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Return oldest date in range when a file is open

    Try

    =MIN(Michael!C:C)

    (it worked on your uploaded file.)
    Blank cells will not be looked at by the MIN function.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Registered User
    Join Date
    02-05-2016
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Return oldest date in range when a file is open

    JohnTopley's answer did the trick, thank you.

  5. #5
    Registered User
    Join Date
    02-05-2016
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Return oldest date in range when a file is open

    Thanks ChemistB but that formula would not exclude closed files.

+ 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: 1
    Last Post: 10-28-2015, 02:22 PM
  2. Detect oldest date in a range
    By Heterodoxy in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-27-2015, 11:13 AM
  3. Return oldest date with some dates excluded
    By Stromming in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-30-2014, 06:32 AM
  4. return oldest date based on call value
    By 288enzo in forum Excel General
    Replies: 8
    Last Post: 02-28-2014, 10:50 PM
  5. sorting a selected range by date, oldest to newest
    By zed commander in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-19-2012, 12:40 PM
  6. Replies: 3
    Last Post: 09-24-2010, 08:37 AM
  7. List only oldest 5 (or 10) open complaints
    By Shocked in forum Excel General
    Replies: 5
    Last Post: 11-09-2009, 04:40 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