+ Reply to Thread
Results 1 to 3 of 3

Last day of month

Hybrid View

pscornelison Last day of month 08-15-2011, 10:34 AM
Colin Legg Re: Last day of month 08-15-2011, 10:50 AM
pscornelison Re: Last day of month 08-27-2011, 10:25 AM
  1. #1
    Registered User
    Join Date
    11-29-2010
    Location
    North Carolina
    MS-Off Ver
    Excel 97 thru Excel 2010
    Posts
    12

    Last day of month

    Trying to update some old macro code for a customer. This used to work (they claim) but now returns "Year to Date As of 1/31/1900"

    ="Year to Date As of " &TEXT(EOMONTH(6/1/2011,0), "mm/dd/yyyy" )

    Thanks.............SRC

  2. #2
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    365
    Posts
    1,256

    Re: Last day of month

    6/1/2011 is being interpreted as 0.0029836 (ie. 6 divided by 1 divided by 2011, not a date).

    ="Year to Date As of " &TEXT(EOMONTH(DATE(2011,6,1),0), "mm/dd/yyyy")

    Or

    ="Year to Date As of " &TEXT(DATE(2011,7,0), "mm/dd/yyyy")
    Hope that helps,

    Colin

    RAD Excel Blog

  3. #3
    Registered User
    Join Date
    11-29-2010
    Location
    North Carolina
    MS-Off Ver
    Excel 97 thru Excel 2010
    Posts
    12

    Re: Last day of month

    Thanks Colin, this is perfect.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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