How to sort results by duplicates

hello. I need some help. I don’t know how to sort results by duplicates finder.

So, I have 2 columns. Column A has the files names. Column B has all the numbers also the duplicate ones.

So, I need to sort Column A and Column B, so I get on the beginning of cells only the duplicate.

How can I do that?

Please update your Q and provide a simplified example of the input and output data, e.g. input: filename1, 45; filename2; 45 Output: ?

And: Better post under your user name.

Is this what you want?

@Lupp: of course i would enable natural Sort to order Name in order:

Name2
Name4
Name8
Name10
…

@karolus (and as an additional explanation to everybody):
I didn’t include sorting by name or by any additional key, and I wouldn’t expect for sure that actual names (not just chosen as examples) observe a syntax making ‘natural sort’ reasonably applicable.
I suggested a sort only by the multiplicity values in the helper column leaving the groups in stable order otherwise.

ok, this is a print screen.

See that the number 345 on B column is a duplicate, and correspond to a different name in Column A.

So, I want to sort somehow, in order to appear the duplicates at the beginning of Columns with the name correspond in A column.

(edit: activated screenshot)

If you move the data into Base, you can create a query to give you what you want.

  • Move the data into a base table

  • Prefix a unique key (ID) column (similar to your row number in Calc):

1 Name X 123
2 Name D 234
3 Name P 345
etc.

  • Create a query on Col B (your numbers) with the Count function as a generated column, this produces:

123 1
234 1
345 2
411 1
531 1

  • Now join this new query to your table in a 2nd query to produce the following:

1 Name X 123 1
2 Name D 234 1
3 Name P 345 2
etc.

Now you can sort by the 5th field first.

Why do you suggest the database-do in this case? It was very simple in Calc. And assuming the table is placed in a Writer document, using a spreadsheet as a helpers should be much simpler, imo.

:stuck_out_tongue: I’m not as good at Calc. btw, what is sorrt by: M_ITY? I searched all over for M_ITY but ??

M_ITY was chosen as an arbitrary abbreviation for “multiplicity” which was the property the OQ wanted the items to get sorted by. The values for this key are generated in a helper column with this label in the first row. Column labels are without any effect concerning the functionality.