chris_uk_lad
08-03-2008, 03:01 AM
I have a delimited text file that i need to make some alterations to before importing into an access table but theres too many records to do manually. Was hoping you can assist on a way to edit the txt file via a VBA procedure.
The way i want to edit is by changing the lengths of the columns. So for the second column i want to truncate start 22 (length 45) to 26 characters by removing start 44 for a length of 21.
Column value example:
08765653452WK433424_________________
(__ representing spaces in that value that i want to remove). I know theres the find / replace method in Access but i dont want to remove all spaces, just restrict the cell value.
Another method i need for another cell is:
Where start (length 2) is AA,
Truncate the start 91 (length 40) to 20 characters by removing start 111 for a length of 20.
Many Thanks for any assistance.
The way i want to edit is by changing the lengths of the columns. So for the second column i want to truncate start 22 (length 45) to 26 characters by removing start 44 for a length of 21.
Column value example:
08765653452WK433424_________________
(__ representing spaces in that value that i want to remove). I know theres the find / replace method in Access but i dont want to remove all spaces, just restrict the cell value.
Another method i need for another cell is:
Where start (length 2) is AA,
Truncate the start 91 (length 40) to 20 characters by removing start 111 for a length of 20.
Many Thanks for any assistance.