Extract characters from string

  • Thread starter Thread starter LOtto
  • Start date Start date
L

LOtto

What I'm looking for is a simple loop that will extract characters from a string until it hits the "-" character, then stops. I have a list that looks like this and I want to cut out the file path so I can sort:


VA01 09242007 P11 - G:\Claims\WINSHUTTLE\VA01 runner Debit memo SPECIAL WITHOUT GC 108 22.TxR
VA01 09242007 P11 - G:\Claims\WINSHUTTLE\VA01 runner Debit memo SPECIAL WITHOUT GC 108 22.TxR
VA01 09242007 P11 - C:\Users\tee4283\Desktop\VA01 runner loop.TxR
VA01 09242007 P11 - G:\Claims\WINSHUTTLE\VA01 runner Debit memo SPECIAL WITHOUT GC 108 22.TxR
VA01 09242007 P11 - G:\Claims\WINSHUTTLE\VA01 runner Debit memo SPECIAL WITHOUT GC 108 22.TxR
VA01 09242007 P11 - C:\Users\tee4283\Desktop\VA01 runner loop.TxR

Result would be:
VA01 09242007 P11
 
Hi,

Am Tue, 10 Jun 2014 06:40:03 -0700 (PDT) schrieb LOtto:
What I'm looking for is a simple loop that will extract characters from a string until it hits the "-" character, then stops. I have a list that looks like this and I want to cut out the file path so I can sort:

VA01 09242007 P11 - G:\Claims\WINSHUTTLE\VA01 runner Debit memo SPECIAL WITHOUT GC 108 22.TxR
VA01 09242007 P11 - G:\Claims\WINSHUTTLE\VA01 runner Debit memo SPECIAL WITHOUT GC 108 22.TxR
VA01 09242007 P11 - C:\Users\tee4283\Desktop\VA01 runner loop.TxR
VA01 09242007 P11 - G:\Claims\WINSHUTTLE\VA01 runner Debit memo SPECIAL WITHOUT GC 108 22.TxR
VA01 09242007 P11 - G:\Claims\WINSHUTTLE\VA01 runner Debit memo SPECIAL WITHOUT GC 108 22.TxR
VA01 09242007 P11 - C:\Users\tee4283\Desktop\VA01 runner loop.TxR

try TextToColumns => Delimited => Separator = "-"


Regards
Claus B.
 
On Tuesday, June 10, 2014 9:40:03 AM UTC-4, LOtto wrote:

Worked great and how simple, I would never have thought of that!

THANKS MUCHLY!!
 
Back
Top