View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JulieD JulieD is offline
external usenet poster
 
Posts: 618
Default how do I subtract 2 date fields to get number of days elapsed?

Hi

one option
assuming open date in A1, close date in B1
=B1-A1
or
=E14-D14 & " days"
(but be aware this second option changes the answer to a text field - if you
want the word "days" but still want it as a number field this can be
achieved with custom formatting.)

then choose format / cells - under the number tab choose Number and set
decimal places as required.

Cheers
JulieD

"Andrew Forbes" <Andrew wrote in message
...
I need to calculate the difference between date fields to get the answer in
days

E.g. Open shop 10 Feb 2004
close shop 15 feb 2004
= 5 days

So what is the formula for this???