Special formatting help

W

Wendy L

Windows XP and Office XP

I import data into a table from a text file. The two fields are "Idnum" and
"Idtype". When these fields are imported, they represent social security
numbers and entity numbers in the "Idnum" field and either an "E" or an "S"
in the "Idtype" field indicating whether the number in "Idnum" field of data
is an entity number or a social security number .

So my table might look like this

Idnum Idtype
78901234 S
751234567 E

What i would like to do is somehow add leading zeros to all strings in the
"Idnum" field that are less than 9 numeric characters long. Also, if the
"Idnum" is indicated as "S" in the "Idtype" field, I would like to format it
as a social security number (078-90-1234). If "E", i would like to format it
as an entity number (75-1234567).

Could someone please give me simplistic instructions on how this might be
accomplished? Thank you in advance for any advice rendered.

~Wendy
 

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