I
I
Ilya Magdenko2018-08-27 17:45:38
excel
Ilya Magdenko, 2018-08-27 17:45:38

How to do certain manipulations in Excel 2007?

Hello, I don't use Excel much. But now it is necessary to process the data in a certain way. As I understand it, you can use the VB language. But I haven't figured out exactly how yet. Perhaps it is not necessary, if what I need can be done and so. Unfortunately, data cannot be taken out from a specific machine, so only on it and with the old spreadsheet. And so
there are 5 columns, with more rows. Let's say the first column is an id. It repeats, sometimes occurs once, sometimes more. How can I delete all lines EXCEPT those in which the id occurs only 2 times? Those. more than 1 less than three. And how where does 3,4 and so on occur?
Another question, there are 4 columns, also with a lot of entries. How to delete all records except those that have certain text in a certain column?
Thanks

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Anton Kiselyov, 2018-08-27
@zamboga

There are 5 columns, with more rows. Let's say the first column is an id. It repeats, sometimes occurs once, sometimes more. How can I delete all lines EXCEPT those in which the id occurs only 2 times? Those. more than 1 less than three. And how where does 3,4 and so on occur?
1. We consider that the table has headings. In any auxiliary column in line 2, enter the formula:
- the formula looks in column "A" for how many times the value of cell A2
occurs for the 3rd row it will be =COUNTIF(A:A;A3), for the 4th row =COUNTIF(A:A;A4) and so on.
3. Apply a filter on our auxiliary column (value ≠ 2) and get all rows whose ID occurs any number of times, except for 2x.
4. Remove unnecessary.
.
.
.
1. Use filter
2. Delete

J
John Smith, 2018-08-27
@ClearAirTurbulence

one.

How can I delete all lines EXCEPT those in which the id occurs only 2 times?

The question is worded incorrectly. Perhaps they meant
"How can I delete all rows EXCEPT those whose id appears in the table only 2 times?"
Otherwise, the question is meaningless.
2.
there are 4 columns, also with more entries. How to delete all records except those that have certain text in a certain column?

Autofilter.
Select the table, or put the cursor in any of its places if it is continuous. Turn on autofilter . Set the condition "does not contain a string" and enter the string that the remaining strings should contain. Only unnecessary lines remain. Highlight them. Delete. Take off the filter. The previously hidden rows containing the string are displayed.

A
Aleksandr, 2018-08-27
@alexgearbox

The problem described in the second paragraph is interesting.
In  the Google table , you need to delete only those rows in which the Ch1, Ch3 and Ch4 columns contain a unit. Ch2 is needed for intermediate calculation. The data in the table must be sorted by ID!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question