LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Subtracting Dates VBA


Hi,

I want to subtract two dates 'YYYYY-MM-DD' but by doing in VBA and
pointing to their respective cells and dump the result in another
cell.

For example, I am working on this experiment :


Sub datescalcul()
Dim Baux As Double
Baux = Application.DATEDIF(Worksheets("Formulaire").Range ("I16").Value,
Worksheets("Formulaire").Range("J16").Value, "m") / 12
sheets("Formulaire").Range("K16").Value = Baux
End Sub


But it does not work. Maye it is that dateDif Excel function cannot be
converted in VBA function?
Thx!

Werner


--
Werner
------------------------------------------------------------------------
Werner's Profile: http://www.excelforum.com/member.php...o&userid=24304
View this thread: http://www.excelforum.com/showthread...hreadid=380612

 
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
Subtracting Dates Dilly Excel Discussion (Misc queries) 10 January 28th 08 04:00 PM
Subtracting Dates Terry Bennett Excel Worksheet Functions 7 November 17th 07 11:38 AM
Subtracting Dates Malik Excel Discussion (Misc queries) 4 October 1st 07 10:44 AM
Subtracting Dates sam Excel Discussion (Misc queries) 3 March 2nd 06 12:47 PM
Subtracting Dates VBA Jean-Jerome Doucet via OfficeKB.com Excel Programming 6 June 20th 05 07:45 PM


All times are GMT +1. The time now is 05:51 PM.

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"