adding dates with excel

J

Justin

I just want to be able to count days between two dates. I am using excel 2003.

example
a1 12/5/1999 b1 03/04/2007
if i want the number of days between a1 and b1 in c1, what should the
formula read? What format should each of the cells be in?
 
B

Brad

since you are concerned about days
=b1-a1 will work

I find that datedif is more efficient when dealing with months or years....
 
J

Justin

So far none of these have worked.

Brad said:
since you are concerned about days
=b1-a1 will work

I find that datedif is more efficient when dealing with months or years....
 
F

Fred Smith

That's too bad, Justin. Any chance you could tell us what "not working"
means? Do you get an error? Do you get 0? Do you get a result that doesn't
look right?

Your date format doesn't matter. What does matter is that your cells need to
contain valid Excel dates. Lots of times people have text masquerading as
dates. This causes problems because you can't do calculations on text. Try
to following:

=istext(a1)

If it returns True, then you have text, not dates, and that's your problem.

Regards,
Fred.
 
B

Bernard Liengme

Which suggest you do not have real dates in the cells. What happens if you
type (in any blank cell) =B1+1 ? Do you see B1' s date incremented by one
(ie the next day?
best wishes
 
J

Justin

Thanks Fred and Bernard. My dates are text and not excel dates. Is there a
way to change the text to date. This is the form they are in the cells
03/24/1975 (mm,dd,yyyy)

Justin
 
F

Fred Smith

Text to columns is the simplest way to replace the text with dates.
Highlight your column and use:

Data>Text to Columns>Next>Next>Date>MDY>Finish

Regards,
Fred.
 
W

ward376

From your original post, put this formula in c1:

=ABS(VALUE(A1)-VALUE(B1))

and format c1 as general. It will return 2646 which is the number of
days between the two dates.

Clioff Edwards
 

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