Formula to find duplicates and eliminate empty cells between lines

Hi
I have a spreadsheet in Libreoffice calc with the following data: A1=RED; A2=BLUE+BLACK; A3=BLUE; A4=RED+BLACK; A5 WHITE; A6=BLUE+BLACK; A7=YELLOW; A8=WHITE. I need a formula that whenever I enter data in the range A1:A8, the formula analyzes and eliminates repeated colors in the range A1:A8 and at the same time does not leave empty cells between the lines. The result can be put in range B1:B8. In this case, for example, the answer would be: B1=RED; B2=BLUE+BLACK; B3=BLUE; B4=RED+BLACK; B5 WHITE; B6=YELLOW ( because BLUE+BLACK, was already repeated in A2 and A6 ); B7=( is empty because WHITE was already repeated in A5 and A8 ); B8= ( is empty because there are no more colors disposable to analyze in the range A1:A ).
I would appreciate a formula to perform these operations automatically.

Thanks

Are BLUE+BLACK and BLACK+BLUE not duplicates from your point of view? If so, then instead of the formula you can use Standard Filter

image

Thank you for your answer, but no. BLUE+BLACK and BLACK+BLUE, are not duplicates.

I used colors but I could have used other combinations (A; A+B; B; B+A; C…)

Ok, try the Standard Filter - it will give the desired result

1 Like

Hi, I answered you in the Portuguese section, you shouldn’t repeat the same on multiple sections

https://ask.libreoffice.org/t/formula-para-encontrar-duplicados-e-eliminar-espacos-vazios-entre-linhas/96792

Asking in multiple language categories is fine, but it best should be stated and linked (in both questions).

1 Like

Ok you are right