Hi,
I have flat text file
I need to read random line from txt file and put into cell
I have code :
---------- or code :![]()
Please Login or Register to view this content.
![]()
Please Login or Register to view this content.
Hi,
I have flat text file
I need to read random line from txt file and put into cell
I have code :
---------- or code :![]()
Please Login or Register to view this content.
![]()
Please Login or Register to view this content.
Last edited by Cutter; 08-01-2012 at 06:02 PM. Reason: Added code tags
VBAxxx,
Welcome to the forum!
In the future, please use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here.
As to your question, it looks you have a tab delimited text file. Do you want one random part of one random line put into a single cell? Or do you want all of one random line split into a row of cells? Are there any restrictions on where the random line (and/or random part from the line) can come from in the text file?
Hope that helps,
~tigeravatar
Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble
in the file is about 2000 lines , one value in one row , for example :
------------
Test1
Test2
Test3
Test4
----------
And I need read random line(value) from this file and paste into Excel Cell
VBAxxx,
Give this a try:
![]()
Please Login or Register to view this content.
it works! , Thx ! ! ! ! !
You're very welcome
If that takes care of your need, please mark this thread as solved.
New quick method:
Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.
Or you can use this way:
How to mark a thread Solved
Go to the first post
Click edit
Click Go Advanced
Just below the word Title you will see a dropdown with the word No prefix.
Change to Solved
Click Save
Hi,
tigeravatar
I am trying to extract the Information from Notepad to Excel through VBA..
My Quiery is I have some Text files.. Lets
Text1
Text2
Text3
Text4
Text1 file I need some information to be extracted (i.e.., after 20 lines my information will be there) should be extracted from 20th line till end
so could you please help me out in this Waiting for your reply and code..
Thanks
Mani deepa
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks