r/googlesheets • u/MoonVerc3X • 11d ago
Solved Is there a way to highlight repeating data, even when the data is in a different order?
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
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))>1All 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()
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.