Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Martin
 
Posts: n/a
Default Importing Text file based on criteria

I need help in how to do this:
Once I key in a Lot number at column A, column B will auto import the text
file based on the lot number in cell A1 (or the nearest match) from a folder
in worksheet B.
How to program it? Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.misc
mrice
 
Posts: n/a
Default Importing Text file based on criteria


You need to create a macro linked to the worksheet_change event of your
first sheet which will then lookup the value in the second sheet and
then use a file open such as

Open "C:\sgdkjagsd.txt" For Input As #1
Do while not EOF(1)
Line input #1, FileLine
Cells(65536,1).end(xlup).offset(1,0) = FileLine
Loop

Close #1


--
mrice


------------------------------------------------------------------------
mrice's Profile: http://www.excelforum.com/member.php...o&userid=10931
View this thread: http://www.excelforum.com/showthread...hreadid=533614

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Stop excel from dropping the 0 in the beginning of a number? Rosewood Setting up and Configuration of Excel 12 April 4th 23 03:12 PM
Importing text file Jeff Excel Discussion (Misc queries) 1 April 4th 06 02:45 PM
Importing Text File into Excel Martin Excel Discussion (Misc queries) 1 April 2nd 06 03:48 PM
Importing a large text file hmm Excel Discussion (Misc queries) 4 March 15th 06 04:13 PM
Importing text file to excel dany04 Excel Discussion (Misc queries) 1 November 9th 05 02:13 AM


All times are GMT +1. The time now is 04:25 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"