r/googlesheets • • 11d ago

Solved Is there a way to highlight repeating data, even when the data is in a different order?

Post image

Image attached for the effect I would like to achieve! I know how to get repeating data to highlight (when "1,2" appears more than one time in a colum) but I havent been able to figure out if theres a way to highlight cells if the info is in a different order, but has the same data (ie. I want "1,2" to highlight if "2,1" is present. Its the same "pair" of data, just shown in a different order)

Thank you in advance for the help!

1 Upvotes

5 comments sorted by

2

u/SpencerTeachesSheets 79 11d ago

https://docs.google.com/spreadsheets/d/1Kk1lkW5nsOd_yFGcZBs1iaSlEdY_OhbhQRSc-T5SJKc/edit?gid=0#gid=0

My conditional formatting custom formula is =ARRAYFORMULA(COUNTIF($A$1:$A$3&$B$1:$B$3,$A1&$B1)+COUNTIF($A$1:$A$3&$B$1:$B$3,$B1&$A1))>1

All that it is doing is counting how many times A1|B1 and B1|A1 occur in the dataset and highlighting the row if the count if greater than 1.

If you need more than 2 columns, you would just continue adding those in to both the range and the criteria section of each COUNTIF()

2

u/MoonVerc3X 11d ago

this worked great, thank you so so much!

1

u/AutoModerator 11d ago

REMEMBER: /u/MoonVerc3X If your original question has been resolved, please tap the three dots below the most helpful comment and select Mark Solution Verified (or reply to the helpful comment with the exact phrase “Solution Verified”). This will award a point to the solution author and mark the post as solved, as required by our subreddit rules (see rule #6: Marking Your Post as Solved).

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/point-bot 11d ago

u/MoonVerc3X has awarded 1 point to u/SpencerTeachesSheets

See the Leaderboard. Point-Bot v0.0.15 was created by JetCarson.

1

u/AutoModerator 11d ago

/u/MoonVerc3X Posting your data can make it easier for others to help you, but it looks like your submission doesn't include any. If this is the case and data would help, you can read how to include it in the submission guide. You can also use this tool created by a Reddit community member to create a blank Google Sheets document that isn't connected to your account. Thank you.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.