Need Guidance on Preventing Duplicating Information in 3 separate columns

I’m creating a file that pulls randomized, sorted words in 3 separate columns (A, B, and C) with 5 rows each. The data comes from an already created list of words (e.g. Carrot, Apple, Orange, Banana, Grape etc. )

The formula I’m using to create the randomize lists is below:

=INDEX(SORTBY(D1:D5, RANDARRAY(ROWS(D1:D5))), SEQUENCE(5))

What I’m trying to do is compare col B with col A and if the word already exists in A, not show it in B and compare C with A & B and if either of those columns contain that word, not show it as well in that specific row.

Example:
The script randomly selects the word Apple for col A for row 3. If the script randomly selects Apple for B AND / OR C for row 3 as well, the word “apple” will not be shown in those cells for B or C (but keep it in col A). It will just be a blank cell. If col A doesn’t contain the word Apple but col B does, then I wouldn’t want col C outputting Apple in that particular cell in that specific row.

I’ve tried a few IF functions to accomplish this with no success and all of my internet searching isn’t coming up with a working solution.

Any help would be appreciated!

You should possibly study Apache OpenOffice Community Forum - [Tutorial] Randomization in Calc - (View topic).

Thank you, I appreciate the link to that site. I didn’t even know it existed. Unfortunately however, my issue isn’t dealing with integers and comparing Min / Max. My issue is removing duplicate text from 2 or more columns.

Cross posted on the OpenOffice forum.

If you cross post, as a courtesy please let us know that you have done so, otherwise it leads to several discussions and a waste of time because several identical answers may be posted by different users.

You might also consider to share details of your operating system and the version of LibreOffice you are using.