SPLITTING COLUMNS

S

SEAN

I have a text column with the data in the following format:

10-N345678 E1234567.

I would like to split this data into several columns so it
is in the following format.

Column 1 10-N
Column 2 345678
Column 3 E
Column 4 1234567

Is this possible?

Thanks in advance

Sean
 
A

Adrian Jansen

Look up the LEFT and MID functions in Help.

Eg:

If your existing string is in txtInput

NewField1 = Left(txtInput,4) 'returns the 4 leftmost chracters
NewField2 = Mid(txtInput,5,6) ' returns 6 characters, starting at the 5th

and so on.

You can do this in VBA code in a form, or directly in a query.

--
Regards,

Adrian Jansen
J & K MicroSystems
Microcomputer solutions for industrial control
 

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