Thread: Date calulation
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Date calulation

do you mean in VBA

dim dtStart as Date, dtEnd as Date

dtStart = Range("B1").Value
dtEnd = Range("B2").Value

msgbox "Days: " & clng(dtEnd-dtStart)

--
Regards,
Tom Ogilvy


"Kenny Dee" wrote:

I'm trying to find a formula for a date count to give me a number of days it
took someone to complete a task. for exsample: =b1-b2 and cell b3 will tell
me how many days it took someone to complete the task.