Answer the question
In order to leave comments, you need to log in
How to remove lines containing certain words?
How to remove lines containing certain words?
For example, there is a txt document or an exel file, in which lines from phrases go into a column. You need to delete lines that contain certain words. For example, these words are also available as a list separately or in a file or somewhere else, it doesn’t matter.
I will consider any options for exel, cmd, vbs, somehow! Help me please.
Answer the question
In order to leave comments, you need to log in
swing sed - for txt/csv it is VERY fast. a file of a couple of gigs parses in a few minutes.
In excel it is very simple if handles.
make headers A1 "DATA", B1 "FLAG" or to taste.
Let's say the values in column A are from A2 and down.
To the right of the value column, a formula is drawn
if the search should be case-insensitive, FIND if case-sensitive.
On the Data tab, enable autofilters.
We filter the DATA column - rows where the value is TRUE contain the required substring.
After filtering - select everything filtered, then on the HOME tab select FIND & SELECT, Go To Special, in the dialog - Visible Cells Only. This way you select only the visible cells.
Delete the lines selected in this way, remove the filter.
If there is really no point in deleting the data, but it is enough to hide them - just filter the table, but by the FALSE tag, the values with the substring will simply be hidden.
If you automate it, it's a little more difficult, but already for money and for freelancing.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question