String Parsing Guidance

psycoperl

Active Member
Joined
Oct 23, 2007
Messages
339
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
  2. MacOS
  3. Web
Hi All I was wondering if all you nice Access Gurus could provide me with some guidance.

I am used to working with comma deliminated text files and parsing them into a table. However I am now getting Fixed width datafiles and the Person's name for each record is no longer comma delminated (Seperating Last, First, Middle) It now comes in chunk of text that is 25 characters long.

I have created an import specification that breaks up the fixed width into the appropriate columns into a tempTable so that I can further process and add it into my database.

What I need to do is split the name into First Middle(if present) and last.

I would get data that is like


Lunqvist Henrik
St Croix Mark
Zuccerello Assen Matts
De Santos Rose Maria
Groh Michael R


If there is only one space, I would like to just split it Last, First
However if there is more than one, I would need to have it prompt the user to split it into the two or three parts.

Don't know the best way to do this. Any guidance you can provide would be great!
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

Forum statistics

Threads
1,223,270
Messages
6,171,102
Members
452,379
Latest member
IainTru

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top