LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 427
Default Dates: calculating days in between

If one column is A and the other column is B, it might be as simple as
=A1-B1

But that can be misleading: you may need to adjust by adding 1 to the
formula, such as
=A1-B1+1
This depends on your desired outcome. If the two dates are May 5 and
May 1, is the correct answer "4", i.e., 5-1, or is it 5 (day 1 + day 2
+ day 3 + day 4 + day 5)?

On top of all that, to get a positive answer, the earlier date must be
subtracted from the later date. If the later date always appears in
column A, A1-B1 will work; if the earlier date always appears in
column A, B1-A1 will work. If the dates can appear in either column,
use
=ABS(A1-B1)
....which returns a positive answer regardless, using the Absolute
value function.

Dave O

 
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
Calculating days between two dates lledelen Excel Discussion (Misc queries) 4 March 9th 07 08:48 PM
Calculating Days Between Dates martins New Users to Excel 5 March 26th 06 11:46 PM
Calculating number of days between two dates that fall between two other dates [email protected] Excel Discussion (Misc queries) 5 October 26th 05 06:18 PM
calculating number of days (e.g., Mondays) between two dates girlfriend in school Excel Worksheet Functions 10 July 14th 05 07:21 PM
Calculating for number of days when values are in dates pumper Excel Worksheet Functions 7 January 17th 05 04:52 AM


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

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

About Us

"It's about Microsoft Excel"