V
V
vladislavik952021-11-11 10:55:38
excel
vladislavik95, 2021-11-11 10:55:38

How to sort tags?

I have the same values ​​in column B, but in column A, these are tags, different values, and I need to remove duplicates from column B, but first I need to insert all the tags for the value in column B into 1 unique row through whom. How can this be done in a formula?

618ccb88aeeae019201167.png

Answer the question

In order to leave comments, you need to log in

3 answer(s)
H
hint000, 2021-11-11
@vladislavik95

I didn't care about intermediate results in cells that would be deleted anyway (E3, E4, E5):
=IF(B2=B3,CONCAT(E3,", ",A2),A2)
618cd45381d9f210260351.png

K
kamenyuga, 2021-11-11
@kamenyuga

Here's an example of how this can be done on stackoverflow .
It is done in several steps, always by hand. Of course, you need to take into account that in Russified Excel, the syntax of the formulas is completely different. The formula in cell E2 will be something like this "=IF(B2<>B1;A2;E1 & "," & A2)" and will allow in the sorted data line by line to reach the full concatenation of all options separated by commas.
Probably, it could be done through pivot tables, but they are very limited, they work only with numbers, but they don’t know how to work with text. Or is this skill hidden somewhere.
In python + pandas, this task is solved elementarily through grouping, as in any kind of sql. It is worth considering this option.

A
Alexander, 2021-11-11
@ForestAndGarden

We need two additional columns: in the first we connect the tags, in the second we display the key value, by which, after converting the formulas in the value, we will then filter.
First column; for E5: = If B5 is equal to B4 then concatenate E4 and A5, else (take value) A5.
Second column; for F5: = If B5 is equal to B4 then insert nothing or space, else (take value) B5.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question