MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Reading Text File into Excel and match the first part with placing the value in 2 nd part

Posted by Andrew Cheung on August 05, 2001 8:25 AM

I have a text file like this:
011235461 1023.00 2226.65
I have the code "123456" in [A1]
How could I read the contents "1023.00" into [b1] and "2226.65" into [c1]
and then the other code and so on?
(the code in column A is in random order but the code in the text file is in ascending order)
Anything like Looping through the cells.
(CInt() is useless as the code is a 6-digit number and it causes the Overflow problem"

Please help!!

Posted by Lokman on August 05, 2001 9:59 AM

What do you mean by code?
Please elaborate your question
to make it easier to understand

Posted by Ian on August 05, 2001 6:08 PM

Not sure if you mean code?

but why not in b1:


in c1

=MID(A1,FIND(" ",A1)+1,7)+0

in d1


and do a lookup on this.

this all depend on then fact that your text file?? always has these numbers in the same place