Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default how do I subtract 2 date fields to get number of days elapsed?

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???

  #2   Report Post  
Posted to microsoft.public.excel.programming
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???



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default how do I subtract 2 date fields to get number of days elapsed?

A1 = 10 Feb 2004
B1 = 15 Feb 2004

Format both cells/rows to the date format you need.
C1 = B1 - A1

Again, make sure you have the right format for time in days.

"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???



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 123
Default how do I subtract 2 date fields to get number of days elapsed?

Assuming that the dates are not more than 360 days apart,
you can use following formula, assuming date1 is in cell A1 and date2 is
is cell B1

=DAYS360(A1,B1)
If you do not want the formula to return a negative number,
and always return a positive number use

=ABS(DAYS360(H63,H64))

Sharad

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Reply
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
How do I subtract/add a known number of days/months from a date? Alf Andersen Excel Worksheet Functions 2 August 1st 07 08:03 PM
Solve 1st of month after specified number of days elapsed MH Excel Worksheet Functions 8 March 7th 07 05:39 AM
How to subtract 2 dates to get number of days.....please Nick Excel Worksheet Functions 3 November 10th 06 01:03 PM
formula for tracking number of elapsed days from a stard date spm1371 Excel Worksheet Functions 1 January 22nd 06 04:52 AM
how to get the number of days between two date formatted fields in vba for excel? Daniel Excel Worksheet Functions 1 July 12th 05 01:53 AM


All times are GMT +1. The time now is 12:10 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"