Extract characters from string

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
 
C

Claus Busch

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.
 
L

LOtto

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!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top