+ Reply to Thread
Results 1 to 9 of 9

Extract and return a Min date and Max dates.

  1. #1
    Forum Contributor
    Join Date
    08-19-2020
    Location
    Dubai
    MS-Off Ver
    Office365
    Posts
    131

    Extract and return a Min date and Max dates.

    Hi,

    Required a formula help to Extract and return a Min date and Max date based on the month and year basis as per the data available in Column A:C.


    Sample sheet with expected results are enclosed.


    Thanks,

  2. #2
    Valued Forum Contributor
    Join Date
    07-23-2013
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    988

    Re: Extract and return a Min date and Max dates.

    Hi, try:

    =MIN(IF((MONTH($A$4:$A$23)=MONTH($E4))*(YEAR($A$4:$A$23)=YEAR($E4))*($B$4:$B$23=$F4)*($C$4:$C$23=$G4),$A$4:$A$23))

    and change the MIN to MAX for the max.

  3. #3
    Forum Expert
    Join Date
    12-09-2014
    Location
    Trakai, Lithuania
    MS-Off Ver
    2016
    Posts
    1,290

    Re: Extract and return a Min date and Max dates.

    Formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  4. #4
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,907

    Re: Extract and return a Min date and Max dates.

    Since you have 365, in H4:
    =LET(dataset,FILTER($A$4:$A$23,($B$4:$B$23=F4)*($C$4:$C$23=G4)*(TEXT($A$4:$A$23,"mm/yyyy")=TEXT(E4,"mm/yyyy"))),CHOOSE({1,2},MIN(dataset),MAX(dataset)))
    and copy down.
    Rory

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,002

    Re: Extract and return a Min date and Max dates.

    and to save a bit of time generating E, F & G:

    =LET(a,A4:A23,b,$B$4:$B$23,bc,B4:C23,u,UNIQUE(bc),cu,COUNTA(u),d,UNIQUE(EOMONTH(+a,-1)+1),mod,1+MOD(SEQUENCE(cu,,0),cu/2),CHOOSE({1,2,3},INDEX(d,INT(SEQUENCE(cu,,1,1/(cu/2)))),INDEX(u,mod,1),INDEX(u,mod,2)))
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  6. #6
    Forum Contributor
    Join Date
    08-19-2020
    Location
    Dubai
    MS-Off Ver
    Office365
    Posts
    131

    Re: Extract and return a Min date and Max dates.

    Many Thanks all of you for your amazing formulas,

    Except post number#03 formula (but Slowdown a sheet) is working, remaining all formulas return a zeros in 45000 Rows data,

    Smaller data all formulas are working well.

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,002

    Re: Extract and return a Min date and Max dates.

    Can you show us in a file (save as xlsb)

  8. #8
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Extract and return a Min date and Max dates.

    Please try

    Please Login or Register  to view this content.
    and for fun Latest function for Excel Insider beta
    Take , HSTACK, VSTACK and 11 more

    Please Login or Register  to view this content.

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

    Re: Extract and return a Min date and Max dates.

    Similar in approach to Czeslaw's but with fewer calculations.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Dave

+ 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: 2
    Last Post: 10-29-2021, 07:55 AM
  2. Replies: 2
    Last Post: 07-19-2018, 11:58 AM
  3. [SOLVED] Macro that compares 2 dates. I need to extract just date, first
    By lcgar in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-29-2016, 10:36 AM
  4. Replies: 9
    Last Post: 10-08-2015, 01:50 PM
  5. Replies: 2
    Last Post: 06-07-2013, 02:21 PM
  6. Return cell value on calendar for all dates between start date & end date
    By mmctague in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-23-2012, 02:11 PM
  7. Compare Dates To Date Range & Return Date Based On Outcome
    By gusmontoya in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-03-2008, 09:06 PM

Tags for this Thread

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