Hello experts,
I am a newbie at writing code which would be helpful in this task.
I have a lot of records in the text string exmple below. Here is the scenario;
The colored char (bolded font) are related to specific fields that I am interested in. The uncolored chars (regular font) are fields I am not interested in.
If I can elaborate:
V1 would be equal to field 1
ABCDEFGHI = Field 2
0012345 = Field 3 and so on
Now here is the problem in some of the text strings there is some additional information that causes the fields not to be in sync. Here is an example. I have 2 text strings but for the Text String 2 there is some additional information colored in yellow chars (italic font) which I do not need and when I use delimiters it throws my fields off sync because it picks up both the field I need In Blue colored chars (Bolded font) and also chars I don’t need (regular font). Also in the Text String 2, APT SUBZERO (italic font) is not there making it more out of sync. Also in Text String 1 the person has no middle initial but “PER*MEM” (Italic Font) which is also causing my fields not to sync up when using delimiter. I believe by using Code or VBA a command can be put to pick the blue colored chars only (Bolded font) in both strings. I am still new at using code and would like some help in figuring this out
My ultimate objective is to convert it in access to an access db table when I can then copy it to excel so that in future when I get a similar file I can run it through the same db using the code already set up. Thank you
Text String1*ABC*Y*18*001*V1*A*E**AC**Y*REF*0F*ABCDEFGHI*REF*1L*0012345*REF*23*XYZ123456*LBC*256*EA*20111215*DTP*473*EA*20120401*DTP*474*EA*20120430*DTP*473*EA*20120501*MN1*IL*1*JANE*DOW*PER*MEM*ZP**TEL*555555555*P3*1234 S SOUTHPOLE APT SUBZERO*APT SUBZERO*N4*SOUTHPOLE*AP*00000**CY*101*DMG*EA*19131213
Text string 2
*ABC*Y*18*001*V1*A*E**AC**Y*REF*0F*ABCDEFGHI*REF*1L*0012345*REF*23*XYZ123456*LBC*256*EA*20111215*DTP*373*EA*20120401*DTP*374*DTP*473*EA*20120401*DTP*474*EA*20120430*DTP*473*EA*20120501*MN1*IL*1*JANE*DOW*E*ZP**TEL*555555555*P3*1234 S SOUTHPOLE *N4*SOUTHPOLE*AP*00000**CY*101*DMG*EA*19131213