This is not hard to do with functions/formulas
if you’re dealing with only two columns.
You’ll need three “helper columns” in addition to a results column,
and you’ll need to identify a string that never appears in your data.
Let’s use columns
H, and the string
=IF(A1<B1, A1, B1)
=IF(A1<B1, B1, A1)
=E1 & "/" & F1
E1 is the lesser (minimum) of
F1 is the greater of
In other words,
F1 contain the values of
but sorted into ascending order.
E1 concatenated with
F1, delimited with
This is a unique, order-independent combination of the values
G3 both contain
because rows 1 and 3 have
aaa in Columns
B in some order.
H counts how many times this combination has appeared so far.
H5 each contains
because rows 3 and 5 are the ones that have a combination for the second time.
When I repeated the row 1 data in row 6, I got
because that was the third time the combination of
As long as the data can be numeric or textual,
this gets very complicated very fast if you want to do more than two columns.
There’s a way to make it easier if the data are all numbers, however.
Or, if you’re willing to stipulate a maximum length for your data
(e.g., nothing longer than three characters), it may become manageable.