"Bennie Sanders" wrote in message
news:%...
: I have a text file with 142 lines, each line beginning with a job number
: and a line number, like this:
:
: "9426 1"
: "9426 2"
:
: through 9426142
What is after the job and line number on those lines and is there really 2
spaces between job and line number?
: I've used the left function to extract the 9426 but how can I separate
: what's left over? The right function isn't returning the remaining
: value properly because there aren't always three characters to the right
: of 9426.
There aren't always three characters or three numbers? You show two spaces
in the first two lines.
If there are always two spaces and more text on the line since you said
"each line beginning with a job number and a line number" then:
dim job, line, temp
str = "9426 1 some other text"
job = left(str,4)
line = trim(mid(str,5,3))
HTH...
--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center -
http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation -
http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library -
http://msdn.microsoft.com/library/default.asp