+ Reply to Thread
Results 1 to 3 of 3

Date function

  1. #1
    Registered User
    Join Date
    03-02-2007
    Posts
    23

    Date function

    I have a workbook that I use to track weekly time I spend for projects. Each of the worksheets in the workbook are named with a date equal to a Friday date (i.e. tomorrow's sheet is called 2007-04-06). Once a month I need to send this workbook to others, but if it's the last week of the month I need to send some additional detail. I have a button on my sheet that when clicked will send the email.

    I need a function that I can call from this email subroutine that will check to see if the name of the active worksheet is a date that falls in the last week of the current month, and if it does, I need it to popup a message reminding me add the additional details.

  2. #2
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    If VBA had an EOMONTH worksheet function available, which comes in the Analysis Toolpak, it would be a little easier. For cases like this, I developed a function that works similar to the EOMONTH worksheet function, but returns the last day of the specified month:
    Please Login or Register  to view this content.
    You can use the above UDF to determine whether the sheet name is in the last week of the month by using something like this:
    Please Login or Register  to view this content.
    HTH

    Jason

  3. #3
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229
    How about
    Please Login or Register  to view this content.

+ 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