import txt file into separate excel sheets and look for a specific row to add
Hello Friends,
I have a nasty VBA code that opens a *.txt file; searches inside the txt file for specific information limitted inside % ... %%% characters and paste them into separately sheets.
Also, It takes the first 8 rows of the file and add them into a new sheet, GENERAL.
What i'm trying to do, when loading the file, besides the above tasks, to search for 2 specific rows (with no fix position) and if they exist inside the *.txt file, to add them as well into the GENERAL sheet (position B12, B13).
The challange is that the rows are like this:
current-value-function1=88
current-value-function2=99
The rows to be added contains a fix part "current-value-function1=" + "number"
Can you please help me with the code sequence to add into the below one, to find these rows and insert them into the GENERAL sheet?
MS 365 Subscription Insider Beta Channel (Windows 11 64-bit)
Posts
62,075
Re: import txt file into separate excel sheets and look for a specific row to add
Thread closed at OP's request - now in commercial services section.
Ali Enthusiastic self-taught user of MS Excel who's always learning! Don't forget to say "thank you" to anyone who has offered you help in your thread. You can reward them by clicking on * Add Reputation below theur user name on the left, if you wish.
Forum Rules (updated September 2018): please read them here.
How to use the Power Query code you've been given: help here. More about the Power suite here.
Bookmarks