Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello
I must be bleary eyed. Is there a VBA function which counts the number of days between two dates (as in the workbooks)? W |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dates & times are stored as numbers.
Therefore simply subtracting one from the other will give you the tim between two dates. Note however that the date is the integer portio only. If you need look at only the dates and ignore the time portio use INT(a) - INT(b) or to round down to the nearest day int(a - b). Hope it helps -- Message posted from http://www.ExcelForum.com |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Just subtract one date from the other.
If you want working days, you can get at the NETWORKDAYS fu nction by setting a reference to ATPVBAEN.xks in TooleReferences, and then calll directly with Run. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "cogent" wrote in message ... Hello I must be bleary eyed. Is there a VBA function which counts the number of days between two dates (as in the workbooks)? W |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You just subtract
Dim a As Date, b As Date a = #6/1/2004# b = #6/10/2004# MsgBox b - a cogent wrote: Hello I must be bleary eyed. Is there a VBA function which counts the number of days between two dates (as in the workbooks)? W |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Count specific days in between dates | Excel Discussion (Misc queries) | |||
Count days between text dates | Excel Discussion (Misc queries) | |||
Count of days between dates | Excel Discussion (Misc queries) | |||
Count days inside 2 dates | New Users to Excel | |||
how to count number of days between 2 dates? | Excel Discussion (Misc queries) |