Dates: calculating days in between

G

Guest

I have an excel spreadsheet with two columns with dates. I would like to set
a formula to see how many days in-between the two dates. Can this be done?
 
D

Dave O

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top