+ Reply to Thread
Results 1 to 13 of 13

Find Oldest Date for Criteria in different Column

  1. #1
    Registered User
    Join Date
    05-04-2006
    Posts
    39

    Find Oldest Date for Criteria in different Column

    Hello,

    I am trying to figure out how to find the oldest date for a certain file type. In Col A we have the file type, and in Col B we have the Date. There is 8 file types I am working with so I will need to find the oldest file date for each of them.

    I know this is not actual syntax, just trying to illustrate what I am attempting to do, thanks

    for(A1:A999)= "New File" return Small(B1:B999)
    for(A1:A999)= "Reevaluation File" return Small(B1:B999)

    For what its worth, I will really be referencing a static list of file types. So it will really be more like
    for(A1:A999)=C1 return Small(B1:B999)
    for(A1:A999)=C2 return Small(B1:B999) etc.

    Any help would be appreciated

    Thanks
    Last edited by mglassco; 04-19-2012 at 07:07 PM.

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Find Oldest Date for Criteria in different Column

    Hi Mglassco, perhaps try the array formula:

    =MIN(IF($A$1:$A$999=C1,$B$1:$B$999))

    This must be confirmed using CTRL+SHIFT+ENTER, not just ENTER. You can then fill that down from C1 to Cx.

  3. #3
    Registered User
    Join Date
    05-04-2006
    Posts
    39

    Re: Find Oldest Date for Criteria in different Column

    Thanks, sounds good and I'll give it a shot!

  4. #4
    Registered User
    Join Date
    05-04-2006
    Posts
    39

    Re: Find Oldest Date for Criteria in different Column

    Hello,

    The response I got is 0
    The info I gave above was generic. So here is formula I ended up with and I did confirm it with Ctrl+Shift+Ent and got the {} but I am hoping to get the actual Date. Column AC starting on line 11 is the file type and Col J is the dates. B2 is my static reference point for the file type.

    =MIN(IF($AC$11:$AC$99999=B2,$J$11:$J$99999))

  5. #5
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Find Oldest Date for Criteria in different Column

    That should work just fine as long as the values in column AC are **EXACTLY** the same as the value in cell B2. No extra spacing, hidden characters, etc. Also, format the cell with the formula as Date, otherwise you'll get numbers as results (representing the serial date).

    If you confirm they are exact, please upload a sample of your data (we don't need 100,000 rows to test) and we can take a look at why it's not working.

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,723

    Re: Find Oldest Date for Criteria in different Column

    If the formula returns a number (particularly about 30,000 or 40,000) then that is the serial number for the date - just format the cell as a date in the style your prefer. If you get zero, it implies a) that the cell is not formatted as a date as you would get 0th January 1900, b) that there was no match (do you have extra spaces in your filetypes, is B2 spelt correctly?), or c) that your dates are not real dates, but text values which look like dates.

    Hope this helps.

    Pete

  7. #7
    Registered User
    Join Date
    05-04-2006
    Posts
    39

    Re: Find Oldest Date for Criteria in different Column

    Hello,

    I believe the issue is that I am trying to get the actual date, I believe with the IF statement we define what it returns, ie True or False

  8. #8
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Find Oldest Date for Criteria in different Column

    If the value in B2 is not found anywhere in column AC, then yes, you'll get 0 (or FALSE). If a match is found, and column J contains actual dates, the minimum date will be returned.

  9. #9
    Registered User
    Join Date
    05-04-2006
    Posts
    39

    Re: Find Oldest Date for Criteria in different Column

    Hello,

    I have got it working. After formatting the Cell i put the formula in and actually formatting the column with the date, it was under general. Now everything seems to be working Except, I realize now I need an additional condition.

    I need to be able to cross reference another column to see if the file is unassigned. I don't know why I wasn't realizing that previously. So I am assuming it will be another IF statement. The column Q tells if the file is Unassigned and I have a static reference at E4

    think this is working for me.

    =MIN(IF($AC$11:$AC$99999=B3,IF($Q$11:$Q$99999=E4,$J$11:$J$99999)))

  10. #10
    Registered User
    Join Date
    05-04-2006
    Posts
    39

    Re: Find Oldest Date for Criteria in different Column

    Well my modified formula is giving me the same results, even with the additional IF statement. Am I not using it correctly?
    Last edited by mglassco; 04-19-2012 at 08:16 PM.

  11. #11
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Find Oldest Date for Criteria in different Column

    Can you please post a sample workbook? It can likely be resolved in one post rather than 20.

  12. #12
    Registered User
    Join Date
    05-04-2006
    Posts
    39

    Re: Find Oldest Date for Criteria in different Column

    Just typos by me, I have got it worked out. Thanks for all your help!!

  13. #13
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Find Oldest Date for Criteria in different Column

    Glad you have it sorted. Please mark the thread as Solved in that case. (Just above the original post in this thread, click Thread Tools > Mark Thread as Solved.)

    Thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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