+ Reply to Thread
Results 1 to 4 of 4

Finding dates in a column

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    10-31-2006
    Location
    Oslo, Norway
    MS-Off Ver
    MS 365 Business
    Posts
    287

    Finding dates in a column

    The dates in column D and F are in the workbook.

    Based on the Month (and year) in F13 I need to construct a formula to find:

    1/ the last date in May in column D, which is 27/5 (D12)
    and
    2/ the last date the month before May, which is shown in column D, and which is 29/4 (D8).

    How do we construct these two formulas ?

    Please see the enclosed workbook.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Finding dates in a column

    Hello
    Try the following:

    Max for May:

    Formula: copy to clipboard
    =MAX(INDEX((MONTH(D2:D19)=MONTH(F16))*(D2:D19),0))


    And previous month:

    Formula: copy to clipboard
    =MAX(INDEX((MONTH(D2:D19)=MONTH(F16)-1)*(D2:D19),0))


    DBY

  3. #3
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Finding dates in a column

    If your list contains dates across years, try these adapted versions of DBY's formula

    =MAX(INDEX((TEXT(D2:D19,"mmyyyy")=TEXT(F16,"mmyyyy"))*(D2:D19),0))

    and

    =MAX(INDEX((TEXT(D2:D19,"mmyyyy")=TEXT(EDATE(F16,-1),"mmyyyy"))*(D2:D19),0))
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  4. #4
    Forum Contributor
    Join Date
    10-31-2006
    Location
    Oslo, Norway
    MS-Off Ver
    MS 365 Business
    Posts
    287

    Re: Finding dates in a column

    Thank you, DBY and Ace_XL
    None of the suggestions calculate the YEAR, so if I have both 2014 and 2015 in the same range the result refers to 2015. At least on my PC.
    But I solve this by limit the range to one year only in the formulas, and the formulas works fine.

+ 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. [SOLVED] Finding the latest and oldest dates in a filtered column.
    By skyping in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-04-2015, 05:35 PM
  2. Finding Missing Dates In a Column of Dates
    By ExcelStudent123 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-09-2014, 05:37 PM
  3. Finding a date in a specific column surounded by other columns with similar dates
    By Freakazoid in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-21-2012, 05:28 AM
  4. Replies: 4
    Last Post: 12-19-2011, 08:40 AM
  5. Finding all dates in a column that are in the range today to a week from now
    By jrcream in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 10-01-2008, 09:32 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