DATE Entry

J

Jim

Several persons are using my spreadsheet and they enter the date in
different formats (12/11/2003 or 1.2.03). This date is used in a calculation
and requires the format DD/MM/YYYY. Is there a way that I can reject a date
that is not in the required format.

Thank you

Jim
 
B

Bernard V Liengme

From an answer I gave in another groupd 2 days ago

Normally all that is needed to change from US <-> Rest of World dates scheme
is to use Format|Cells|Dates, But I suspect the dots in you dates are
causing a problem. You may need to extract the three numeric values and make
a 'date' out of them.

Here is one way with your date in A2 (there could well be better ways -
text functions are not my speciality)
dd(in C2) =MID(A2,1,FIND(".",A2)-1)
mm(in D2)
=MID(A2,FIND(".",A2)+1,FIND(".",A2,FIND(".",A2)+1)-FIND(".",A2)-1)
yy(in E2) =RIGHT(A2,2)
date =DATE(E2,D2,C2)

Having got the correct dates you can use Copy followed by Paste Special as
Values to let you delete all the intermediate stuff.

Bernard
 
R

Ron Rosenfeld

Several persons are using my spreadsheet and they enter the date in
different formats (12/11/2003 or 1.2.03). This date is used in a calculation
and requires the format DD/MM/YYYY. Is there a way that I can reject a date
that is not in the required format.

Thank you

Jim

Check out Data/Validation


--ron
 
R

Ron Rosenfeld

Validation is not adequate really


Jim

Well it would reject dates that are not in the required format, which is what
you asked for.

Do you have some additional requirements that you did not state?


--ron
 
J

Jim

Needs to regect dates that are not in the correct format such as 1.1.03
which is being accepted as a time.Validation seems to check for certain
dates


Jim
 
R

Ron Rosenfeld

Needs to regect dates that are not in the correct format such as 1.1.03
which is being accepted as a time.Validation seems to check for certain
dates


Jim


Well if I use Data Validation, set it to dates, and enter a date range such as
1/1/1920 to 1/1/2999, 1.1.03 gets rejected; as do entries that could be
accepted as times here in the US. Such as 1:10:00


What regional settings are you using?


--ron
 

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