hI
i need help with macro to count numbers of lines in the
text file and then delete line number 62 and then every line +60 lines
thanks
hI
i need help with macro to count numbers of lines in the
text file and then delete line number 62 and then every line +60 lines
thanks
The code I gave you earlier showed you how to read a text file and output to another. Just add a counter and when you get to 62, don't write it. Then every 60 thereafter don't write.
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
hi
i want to ask another question regarding the same issue
how can i prevent the copy of the next line after special value.
i can manage with the searching of the value but the prevention i am stuck
thanks.
What you need to do is open the file once as input, and a new file as output. Read each line of input and write to output. If you want to insert a line, just write it to output. If you want to delete a line, don't write it at all.
Finally, kill the input file and rename the output file.
It is all in that previous example, just need to tweak it to your circumstances.
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
thanks for everything
i succeeded but still i can not find the way
if 2 continues lines are the same do not write them
thanks
Post your workbook and input file, and highlight which lines should not be copied.
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
Hi
you can see in the input file
that if there is 2 lines one after anther looking like
"--------------------------------------------------------------------------------"
those 2 lines should not be copied.
but if after 1 line there is some thing else it ok to copy.
thanks
sorry i could not highlight those lines.
Oleg