Remove duplicates based on one column value

Asked

Viewed 289 times

1

I would like to know how I can perform the following filter:

Antes da filtragem ===> inserir a descrição da imagem aqui

That is, how to remove duplicates in the "action" column, but leaving the record with higher priority (in this case, '1' is the person with the highest priority and '8' the person with the lowest priority).

  • You use Excel or libreoffice?

  • In the case of example, I did in Excel, but I would like to understand a solution for both, if possible.

  • There are several ways to compare or find strings. A list with some Find methods can be found in the link response. After each data located is compared... A quick way is to use Autofilter in the action column for an action and then check the higher value of the visible cells with a Worksheetfunction.Min(). Because the native method of Excel VBA .RemoveDuplicate does not have this logical function to check the priority.

1 answer

0

Only with macro, programming VBA. In Libreoffice Calc, without using macro, it is possible to make a filter for a line, and not generate all lines. It would be generated one line at a time.

tabela a ser visualizada no LibreOffice Calc

The table boils down to cells A1:C9.

The other cells are formulae, except cell C13, which must be changed.

Now we go to the formulas. The character "=" was purposely removed for the display of the formula.

fórmulas usadas no LibreOffice Calc

In cell B16, the lowest "Priority" of the chosen "Action" is calculated.

In cell A19, the "Name" for "Priority" and "Action" are calculated".

Line 19 would be the filter itself.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.