Add tags in Calc

Is there a way I can add a list of “tags” in a Calc table then search/sort elements in that table based on those tags. The tags would be something like “abcd,xyz,spqr”.

From where is the list added?

Will be easier to help if you upload a file with a sample about what you want to get.

I think what the OP wants (please confirm) is this:

fruit | colors

orange | yellow,white,green

apple | red,white,green

banana | yellow,white

all_colors | red | green | yellow | white

Then a menu where he chooses the phone and tags range, chooses a separator (","), and can then says sort by column 2, first those lines which contain the tag, say “yellow”, and then those that do not.

I would also love to see a way to select the cells under tags, and say: suggest autocomplete with content one of the cells from under all_tags (this is indicated by selecting those cells)

[should be a comment on the question, but I can’t find how to do this sorry]