• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Need formula to find Minimum date and maximum date per each subject

zeal7619

New Member
Hello helpers,

Could you please let me know the formula to figure out the minimum date and max date per subject in the attached spreadsheet.
 

Attachments

  • BR_TXC.xlsx
    267.7 KB · Views: 20
what version of excel do you have
you could use
UNIQUE() to get a list of the subject numbers
then MINIFS() for min and MAXIFS() for max

which column is the date you want to find the min and max of
 
This follows @ETAF and uses 365 to build a separate table with each subject sorted and on a single row
Code:
= LET(
    distinctSubjects, SORT(UNIQUE(Table1[Subject Number])),
    earliestStart,    MINIFS(Table1[Start date], Table1[Subject Number], distinctSubjects),
    latestStop,       MAXIFS(Table1[Stop date],  Table1[Subject Number], distinctSubjects),
    HSTACK(distinctSubjects, earliestStart, latestStop)
  )
 
what version of excel do you have
you could use
UNIQUE() to get a list of the subject numbers
then MINIFS() for min and MAXIFS() for max

which column is the date you want to find the min and max of
I use off 365 sir. I would like to get the Minimum date from Column D (Start Date) and Max date from the Stop date column E.
 
This follows @ETAF and uses 365 to build a separate table with each subject sorted and on a single row
Code:
= LET(
    distinctSubjects, SORT(UNIQUE(Table1[Subject Number])),
    earliestStart,    MINIFS(Table1[Start date], Table1[Subject Number], distinctSubjects),
    latestStop,       MAXIFS(Table1[Stop date],  Table1[Subject Number], distinctSubjects),
    HSTACK(distinctSubjects, earliestStart, latestStop)
  )
Thank you
 
Back
Top