Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom
 
Posts: n/a
Default Datedif incorrect month count - February problem??

I believe Ron forgot to include another UDF called EOM (End Of Month) A
quick google on Ron's name and EOM gives this


-------------------------------------------------------
Function EOM(DT As Date, mnths As Double) As Date
Dim Day1ofDT As Date
Dim temp As Date


Day1ofDT = DT - Day(DT) + 1


'add requisite number of months
temp = DateAdd("m", mnths, Day1ofDT)


'go to end of month


EOM = temp + 32 - Day(temp + 32)


End Function
--------------------------------------------


you can put that in the same module and now it should work (haven't tested
it but I am sure it will)


--

Regards,

Peo Sjoblom



"JMKCT" wrote in
message ...

I've tried using the UDF, but I get a "sub ior function not defined at
"Temp = EOM(d1, i)". Is there a reference I need to load in VBA for
this?
Thanks, JMK


--
JMKCT
------------------------------------------------------------------------
JMKCT's Profile:

http://www.excelforum.com/member.php...o&userid=29394
View this thread: http://www.excelforum.com/showthread...hreadid=491085



Reply
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
Date Calculations Bruce Excel Worksheet Functions 11 May 19th 05 01:09 AM
Conversion SVC Excel Worksheet Functions 9 February 28th 05 02:29 PM
PivotTable - Count by Month Gigi Excel Worksheet Functions 3 January 1st 05 12:30 PM
Count and Sum with Conditional Formatting Problem pmahajan Excel Worksheet Functions 1 December 14th 04 05:30 AM
Count data entries and date problem Gef Excel Worksheet Functions 5 November 4th 04 02:30 PM


All times are GMT +1. The time now is 04:09 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"