LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default Identify last date of a specific month

Hi Papa,

Did Rick's suggestion work? It should. I forgot about the function being
part of the Analysis Tool Pak.

If it still doesn't work, what version of Excel are you using? Help back as
far as XL2002 has info on EOMONTH function. I don't suppose you were looking
in Help under the VBA editor. If you have help open with VBA and change to
worksheet then you have to click help again because they are 2 completely
different helps.


--
Regards,

OssieMac


"Papa Jonah" wrote:

OssieMac,
I am apparently not getting it. My headers are in row 2. My dates are in
column H.
I have tried =eomonth(h2,0) and I have tried =eomonth(h3,0)
Both have resulted in #Name?
I have tried formatting the cell as a date. I'm not sure what is happening.
There doesn't seem to be any help for the EOMonth function either.

"OssieMac" wrote:

Hi Papa,

Assuming that B1 is the header the following is the worksheet function for
last day of month. Look up EOMONTH in help for more info.

=EOMONTH(B1,0)

Using the function on the worksheet, it works irrespective of whether B1 is
formatted as text or as a date formatted as mmmm-yy.

If used in VBA as

WorksheetFunction.EoMonth(Range("B1"), 0)

then it works if B1 is a date formatted as mmmm-yy but if B1 is text, it
cannot evaluate a 2 digit year and 08 becomes the current year. However, it
can evaluate December 2008.

--
Regards,

OssieMac


"Papa Jonah" wrote:

I have a spreadsheet that identifies months in a column. The format is:
December-08 (for December 2008).
I need to take that and identify that 12/31/2008 is the last date in that
month. I need to do this in order to calculate the number of days between
that date and today.
TIA,
Papa

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
if todays date is in the month of january, then specific drop down list, if feb, another list, etc bjohnson Excel Programming 1 September 19th 07 01:15 PM
In Excel How do I return the Month for a specific date Ashok Natarajan Excel Discussion (Misc queries) 1 January 23rd 06 09:05 AM
Returning the Week Number of a Specific Date on a Month arjcvg Excel Worksheet Functions 0 November 5th 04 01:21 AM
Returning the Week Number of a Specific Date on a Month arjcvg Excel Worksheet Functions 1 November 3rd 04 04:35 AM
Returning the Week Number of a Specific Date on a Month arjcvg Excel Worksheet Functions 0 November 3rd 04 04:26 AM


All times are GMT +1. The time now is 09:25 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"