PDA

View Full Version : Text decomposition



FrymanTCU
11-03-2008, 01:31 PM
I have a table with Office number, AE number, and Name. I need to chop the name up into seperate parts and create a record for each a seperate table. I figure it would be a real simple loop for Randy or one of the other regulars on here. Thans in advance!

Sample Data:

OBP
11-04-2008, 04:57 AM
Do you really need VBA to do this, Text to Columns and Paste Special Transpose should take care of it.
How many rows do you have?
When you say seperate table do you mean in Access?

CreganTur
11-04-2008, 06:40 AM
Since you posted an Excel spreadsheet I'm guessing that you're wanting to work in Excel. If so, then you should look into Tony's suggestions- Excel help should explain those different methods.

If you really need a VBA solution then you need to look into the InStr method- you can use it to determine where the delimeter is in your text string, then you just need to pull the string apart and put the different elements into various cells.

If you've got more Excel questions then I would highly reccomend posting them in the Excel forum :thumb

FrymanTCU
11-07-2008, 09:46 AM
I'm not retarded this was an Access Question. The file is a download from BO in Excel format that I want to upload into a database. I was able to fix the problem with the BO team and we now have the data in the right format. But thanks anyways.