Remove Duplicates from a lookup field

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


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:


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.  

Any advice is greatly apprceiated.  


3 Replies 3
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:




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