+ Reply to Thread
Results 1 to 5 of 5

finding max date for a particular month

  1. #1
    Forum Contributor
    Join Date
    12-13-2012
    Location
    Shropshire, England
    MS-Off Ver
    Excel 2007 /10 /13
    Posts
    118

    finding max date for a particular month

    Happy New Year to you all

    I have a sheet that has a list of dates in column B, can be multiple instances, I have the following line that findes the end date based on a previously defined date
    Please Login or Register  to view this content.
    this looks for the last working date of the previous month, but I've had a problem this month where that the 31st Dec doesn't not actually feature in my list, so I need something that will look for the MAX date in that previous month and use that instead.

    any ideas please?

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: finding max date for a particular month

    This will take you to the given date, if it is in the column, or to the first existing date that precedes the given date.

    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Forum Contributor
    Join Date
    12-13-2012
    Location
    Shropshire, England
    MS-Off Ver
    Excel 2007 /10 /13
    Posts
    118

    Re: finding max date for a particular month

    Hi

    I've tried this, I replaced the GivenDate with EndDate, as I'm already using that, but it's just exiting the sub...

    just commented out the IF line and it works fine
    Last edited by BillDoor; 01-07-2016 at 11:15 AM. Reason: update and spelling

  4. #4
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: finding max date for a particular month

    The If line is there as protection if EndDate is before any of the values in the column. (You end up in an infinite loop)

    Perhaps
    Please Login or Register  to view this content.
    will do the same.

  5. #5
    Forum Contributor
    Join Date
    12-13-2012
    Location
    Shropshire, England
    MS-Off Ver
    Excel 2007 /10 /13
    Posts
    118

    Re: finding max date for a particular month

    that seems to work better!

    thanks

+ 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. Finding Vacancy Percentage Month Wise from Check in and Check out Date
    By HemZone in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 10-29-2015, 10:51 AM
  2. Replies: 3
    Last Post: 05-21-2015, 05:27 AM
  3. [SOLVED] Formula for finding the difference between the 1st of month and 1st of another month
    By btoohey44 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-06-2014, 07:49 PM
  4. Replies: 1
    Last Post: 12-03-2009, 01:42 PM
  5. Reg: Finding Month-to-date Value
    By kvbalakumar in forum Excel General
    Replies: 1
    Last Post: 04-15-2009, 02:16 AM
  6. Finding the date on the 'nth' Monday in this Month in this Year
    By agarwaldvk in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-17-2006, 05:55 PM
  7. Finding min and max date of a given month
    By Caro-Kann Defence in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-13-2005, 02: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