Help

Remove Duplicates from a lookup field

Topic Labels: Formulas
1311 3
cancel
Showing results for 
Search instead for 
Did you mean: 
Mike_Thorington
5 - Automation Enthusiast
5 - Automation Enthusiast

Hello

I have a lookup field that lists every area code in each time zone.  These are listed by zip code within each time zone so there are a ton of repeats.  You can see them in the area_codes field:

Mike_Thorington_0-1707417208108.png

I've tried to create a formula field (UniqueAreaCodes) to remove all the duplicates but as you can see it is still outputting some duplicates.  I have tried ARRAYUNIQUE(area_codes) as well as 

ARRAYUNIQUE(ARRAYFLATTEN(area_codes)).  These provide the same result.  I've also tried a myriad of other complex formulas with no luck.  I think part of the problem is that area_codes field is seperated by a carriage return and is not all one string.  I tried to put that field into a continuous string first before using the array formula.  Still no luck.  
 
Mike_Thorington_1-1707417487903.png
Mike_Thorington_2-1707417494051.png

Any advice is greatly apprceiated.  

 

3 Replies 3
Sho
11 - Venus
11 - Venus

Hi @Mike_Thorington,

What fields are "area_codes"?
It seems that a single record may contain multiple codes.
If it is one code per record, there should be no problem.

The fields that area codes are in are individual zipcodes.  Think of the zipcode you live in and all the surronding zip codes.  They will all have the same listed area code(s) in that area.  Some overlap, some are very large areas with 1 area code.  So there will be many area codes of the same number listed per zipcode

For example:

 

Mike_Thorington_0-1707442901616.png

 

It is possible to have more that one code per record to follow up.