Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
number of days between dates
I need to calculate the number of days between dates but
am not having much luck with the datediff function. Here's the code I'm trying to use: Dim vNumberofDays As Integer Dim vDate1 As Date Dim vDate2 As Date Range("A1").Select ActiveCell.Offset(1, 25).Select Do Until IsEmpty(ActiveCell.Offset(0, -3)) = True vDate1 = ActiveCell.Offset(0, -16) vDate2 = ActiveCell.Offset(0, -9) vNumberofDays = DateDiff(d, vDate1, vDate2) ActiveCell = vNumberofDays vNumberofDays = 0 ActiveCell.Offset(1, 0).Select Loop Any help would be appreciated.....Thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Need to calculate the number of days between two dates on a 30 day | Excel Worksheet Functions | |||
Number of Weekend Days between 2 Dates Q | Excel Worksheet Functions | |||
How to subtract 2 dates to get number of days.....please | Excel Worksheet Functions | |||
Calculating number of days between two dates that fall between two other dates | Excel Discussion (Misc queries) | |||
convert dates to number of days | Excel Worksheet Functions |