lookup and copy certain value in a loop

  • Thread starter Thread starter djenzovoort
  • Start date Start date
D

djenzovoort

Hello,

I have a problem wich i cant seem to resolve.

Have a txt file with alot of data placed in one row. There is also the
value SHEET.

If imported in excel;

I want excel to find the value SHEET and if found copy the 5th, 10th
and 15th row under the value SHEET .. and paste it in colum B , C,
D ...
I want to do this in a loop (the value SHEET could exist more than 100
times in that column).

Hope someone can point me in the right direction.

Thanks in advance!
J.Lemmens
 
!! Correction:

Hello,

I have a problem wich i cant seem to resolve.


Have a txt file with alot of data placed in one row. There is also
the
value SHEET.


If imported in excel;


I want excel to find the value SHEET and if found copy the line below
and the 5th, 10th
and 15th row under the value SHEET .. and paste it in colum B , C,
D ,E ...
I want to do this in a loop (the value SHEET could exist more than
100
times in that column).


Hope someone can point me in the right direction.


Thanks in advance!
J.Lemmens
 
please, try to reformulate your question, give a small piece of data showing
your problem.
if you expect someone to help you, please invest few minutes to properly
document your case
 
Thanks for the reply, thought i explaned it in good detail cause the
problem isn't that complicated;

The txt file is a huge file (about 50.000 lines);

I need to collect some data from this txt file, i have found a
constant wich i want to look for:

SHEET 7K295 or SHEET 6H320 etc.

Now i want Excel to find the string SHEET and when found copy the name
SHEET +7K295
And then also copy the 4th row below the string "SHEET", and the 9th,
the 14th and 19th and put those values like this in excel:

ColumA
B C
D E

SHEET 7K295 data 4th row data
9th row data 14th row data 19th row
SHEET 6H320 data 4th row data
9th row data 14th row data 19th row
etc
etc

Hope this is a good explenation,
 
ColumA
SHEET 7K295
SHEET 6H320
etc

Column B
data 4th row below SHEET 7K295
data 4th row below SHEET 6H320
etc

Column C
data 9th row below SHEET 7K295
data 9th row below SHEET 6H320
etc

Column D
data 14th row below SHEET 7K295
data 14th row below SHEET 6H320
etc

Column E
data 19th row below SHEET 7K295
data 19th row below SHEET 6H320
etc
 
Thanks for the reply, thought i explaned it in good detail cause the
problem isn't that complicated;

The txt file is a huge file (about 50.000 lines);

I need to collect some data from this txt file, i have found a
constant wich i want to look for:

SHEET 7K295 or SHEET 6H320 etc.

Now i want Excel to find the string SHEET and when found copy the name
SHEET +7K295
And then also copy the 4th row below the string "SHEET", and the 9th,
the 14th and 19th and put those values like this in excel:

just a last mistery:

so your data [txt file 50000 lines] is placed in column A of one worksheet,
having splitted into 50000 lines, you want to scan column A and look for
string "SHEET" as a start position, ok?

in one of previous post you said txt file is in one *row*, is it mistake, is
it *column* in fact?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top