ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   adding dates with excel (https://www.excelbanter.com/excel-discussion-misc-queries/190352-adding-dates-excel.html)

Justin

adding dates with excel
 
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?

Mike H

adding dates with excel
 
Try,

=DATEDIF(A1,B1,"d")

Mike

"Justin" wrote:

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?


Brad

adding dates with excel
 
since you are concerned about days
=b1-a1 will work

I find that datedif is more efficient when dealing with months or years....
--
Wag more, bark less


"Justin" wrote:

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?


Justin

adding dates with excel
 
It is not working. What format do my cells need to be in?

"Mike H" wrote:

Try,

=DATEDIF(A1,B1,"d")

Mike

"Justin" wrote:

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?


Justin

adding dates with excel
 
So far none of these have worked.

"Brad" wrote:

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

I find that datedif is more efficient when dealing with months or years....
--
Wag more, bark less


"Justin" wrote:

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?


Fred Smith[_4_]

adding dates with excel
 
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.

"Justin" wrote in message
...
So far none of these have worked.

"Brad" wrote:

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

I find that datedif is more efficient when dealing with months or
years....
--
Wag more, bark less


"Justin" wrote:

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?



Bernard Liengme

adding dates with excel
 
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
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Justin" wrote in message
...
So far none of these have worked.

"Brad" wrote:

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

I find that datedif is more efficient when dealing with months or
years....
--
Wag more, bark less


"Justin" wrote:

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?




Justin

adding dates with excel
 
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

"Bernard Liengme" wrote:

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
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Justin" wrote in message
...
So far none of these have worked.

"Brad" wrote:

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

I find that datedif is more efficient when dealing with months or
years....
--
Wag more, bark less


"Justin" wrote:

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?





ward376

adding dates with excel
 
=VALUE(A1)

then format as you like.

Cliff Edwards


Fred Smith[_4_]

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

DataText to ColumnsNextNextDateMDYFinish

Regards,
Fred.

"Justin" wrote in message
...
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

"Bernard Liengme" wrote:

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
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Justin" wrote in message
...
So far none of these have worked.

"Brad" wrote:

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

I find that datedif is more efficient when dealing with months or
years....
--
Wag more, bark less


"Justin" wrote:

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?






ward376

adding dates with excel
 
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


All times are GMT +1. The time now is 09:26 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com