View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein \(MVP - VB\)[_2082_] Rick Rothstein \(MVP - VB\)[_2082_] is offline
external usenet poster
 
Posts: 1
Default Format colum for number and next colum age

For your first question, select the entire column, right click it and choose
Format Cells from the popup menu that appears, choose the Number tab on the
dialog box that appears, select Custom in the Category list and copy/paste
this in the Type field...

000000 0000 00 0

The answer for your second question is a little more problematic because you
are only using 2-digit years. Assuming no one will ever be more than 100
years old, try this formula...

=DATE(LEFT(A1,2),MID(A1,3,2),MID(A1,5,2))

where I have assumed your ID number is A1 (adjust the formula accordingly).

Rick


"pswanie" wrote in message
...
Im from south africa. we use a ID number system. it looks and consist of
the
following

800506 5001 05 2
The user will enter the 13 numbers without space or any thing. What i need
is:

================================================== ==
colum d to automaticly put a space after the first 6 numbers and a space
after the next four numbers and then after the next to numbers ie:

8005065001052 = 800506 5001 05 2

then
colum e i need to deduct the first six numbers from todays date becouse
the
first six numbers represent the date of birth that is 1980-05-06

so colum e will then show the persons age ie: 28
================================================== ===

do appreciate

thanx
--
Helpful advice on posting to newsgroups here...
http://www.cpearson.com/excel/newposte.htm