Script to find duplicate groups of data in no specific order

124 views
Skip to first unread message

Craig Willett

unread,
Apr 25, 2024, 5:05:56 AMApr 25
to Google Apps Script Community
Hi, I'm looking for a function that will find duplicate groups of data.  Say I've got something like:

cells2.png

What I'm looking for is a function that will go through and match the two groups that are the same (the 3, 4 and the 4, 3 groups).   My groups have 6 pieces of data though, but thought that be easier to work with.  Anyone have anything out there?

Thanks,

Craig

Keith Andersen

unread,
Apr 25, 2024, 1:54:49 PMApr 25
to google-apps-sc...@googlegroups.com
How many rows/cells of data are you talking about? Is it all numbers? 

Keith 




Passions: God, Family, Scriptures, Learning, Data Management, Google Sheets + App Script and much more!

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/e6e6a045-8492-4f39-b06e-c4e376cc2c7en%40googlegroups.com.

Craig Willett

unread,
Apr 25, 2024, 4:09:21 PMApr 25
to Google Apps Script Community
Hey Keith,

Here's an actual screenshot of the data.   It's a fantasy HR Derby thing I run.  I want to be able to check for duplicate rosters.  These rosters go from E1:N119.

data.png

Keith Andersen

unread,
Apr 25, 2024, 4:27:21 PMApr 25
to google-apps-sc...@googlegroups.com
Are you looking to find if one card of six players is exactly like another card of six players? Or are you trying to find out if something different?




Passions: God, Family, Scriptures, Learning, Data Management, Google Sheets + App Script and much more!

Craig Willett

unread,
Apr 26, 2024, 3:27:48 AMApr 26
to Google Apps Script Community
That's exactly what I'm trying to find.  If there are two teams with all 6 players the same.  They won't be in the same order necessarily, but just that they have the same exact roster.  

Keith Andersen

unread,
Apr 26, 2024, 11:43:23 PMApr 26
to google-apps-sc...@googlegroups.com



--



Passions: God, Family, Friends, Scripture, Data Management, Google Sheets + App Script, MS Access, Programing, sharing and much more.

Laurie Nason

unread,
Apr 28, 2024, 12:51:37 AMApr 28
to google-apps-sc...@googlegroups.com
Hi Craig,
I am guessing it doesn't matter which order they appear in, could you use a helper column (H) where you have the following function :
=textjoin("|",true,SORT(TRANSPOSE(A2:F2)))

Screenshot 2024-04-25 at 12.37.15 PM.png


--

Laurie Nason

unread,
Apr 28, 2024, 12:54:37 AMApr 28
to google-apps-sc...@googlegroups.com
I realise now that this is going across columns - but the same principle would apply for across rows (you wouldn't need the "TRANSPOSE" part - I would put in a hidden row at the top of each group to do the calculation.

Craig Willett

unread,
Apr 29, 2024, 9:27:43 AMApr 29
to Google Apps Script Community
Hey Keith, I think this might work.  Not too hard to implement either.  I'll give this a shot.  Thanks

Keith Andersen

unread,
May 3, 2024, 7:49:14 AMMay 3
to google-apps-sc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages