So %arr() has 4 elements:
%arr1 = 8,24,29,41,62
%arr2 = 11,24,36,47,53,62,68,80
%arr3 = 3,8,22,40,44,62,75
%arr1 = 16,35,51
I need help figuring out how to compare these arrays to determine the most common number...in the example above...62.
Oops, corrected to %arr4
So %arr() has 4 elements:
%arr1 = 8,24,29,41,62
%arr2 = 11,24,36,47,53,62,68,80
%arr3 = 3,8,22,40,44,62,75
%arr4 = 16,35,51
Hi, Jeremy
Welcome back.... :) hope all is well with the family..
Here is my take on this. You will just need replace A1 with a variable set %num TO: %arr()
Common Num (204)
A1: Variable Set [ Name:%num To:1,2,8,24,29,41,62,11,24,36,47,53,62,68,80,3,8,22,40,44,62,75,16,35,51 Do Maths:Off Append:Off ]
A2: Variable Set [ Name:%match_b To:0 Do Maths:Off Append:Off ]
A3: Variable Split [ Name:%num Splitter:, Delete Base:Off ]
A4: For [ Variable:%item Items:1:80 ]
A5: Variable Set [ Name:%index To:%num(#?%item) Do Maths:Off Append:Off ]
A6: Variable Split [ Name:%index Splitter:, Delete Base:Off ]
A7: [X] Flash [ Text:%item Long:Off ]
A8: Variable Set [ Name:%match_a To:%index(#) Do Maths:Off Append:Off ]
A9: [X] Flash [ Text:%match_a Long:Off ]
A10: Variable Set [ Name:%common To:%item Do Maths:On Append:Off ] If [ %match_a > %match_b ]
A11: Variable Set [ Name:%match_b To:%match_a Do Maths:On Append:Off ] If [ %match_a > %match_b ]
A12: End For
A13: Flash [ Text:%common Long:Off ]
Hi Rich! The family is doing well, thanks! :)
You have outdone yourself again, this works perfectly! Very much appreciated! Thank you!