# Re: Formula to SHOW duplicated values in a field

389 0
cancel
Showing results for
Did you mean:
5 - Automation Enthusiast

I have the following in a field:

Value 1, Value 2, Value 3, Value 4, Value 5, Value 1, Value 2

I need a formula to show me the repeated values:

Value 1, Value 2

Alternatively, I have another field with the unique values of:

Value 1, Value 2, Value 3, Value 4, Value 5

So another option could be a formula to compare this field with the original one and output the differences?

11 - Venus

I have an experimental Rollup Field formula.
You cannot use " < > @ , " for values.
Up to 5 types of values (more if you add more rows).

``````REGEX_REPLACE(
"@>"&SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(
ARRAYJOIN(values)&",",
REGEX_EXTRACT(ARRAYJOIN(ARRAYUNIQUE(values)),"([^,]*,?\$?){1}"),"<@"& REGEX_EXTRACT(ARRAYJOIN(ARRAYUNIQUE(values)),"([^,]*,?\$?){1}") & "@>",2),
REGEX_EXTRACT(ARRAYJOIN(ARRAYUNIQUE(values)),"([^,]*,?\$?){2}"),"<@"& REGEX_EXTRACT(ARRAYJOIN(ARRAYUNIQUE(values)),"([^,]*,?\$?){2}") & "@>",2),
REGEX_EXTRACT(ARRAYJOIN(ARRAYUNIQUE(values)),"([^,]*,?\$?){3}"),"<@"& REGEX_EXTRACT(ARRAYJOIN(ARRAYUNIQUE(values)),"([^,]*,?\$?){3}") & "@>",2),
REGEX_EXTRACT(ARRAYJOIN(ARRAYUNIQUE(values)),"([^,]*,?\$?){4}"),"<@"& REGEX_EXTRACT(ARRAYJOIN(ARRAYUNIQUE(values)),"([^,]*,?\$?){4}") & "@>",2),
REGEX_EXTRACT(ARRAYJOIN(ARRAYUNIQUE(values)),"([^,]*,?\$?){5}"),"<@"& REGEX_EXTRACT(ARRAYJOIN(ARRAYUNIQUE(values)),"([^,]*,?\$?){5}") & "@>",2)&"<@",
"@>[^<>@]*<@","")``````