Forum Discussion
AaronEMT
Mar 07, 2024Copper Contributor
Keep first occurrence and remove duplicates
Hello,
I need a process or formula that can do the following:
Remove all but the first occurrence of an email address.
Example below:
Before:
After
Note that I would need duplicates of the other columns to not be counted as duplicates, only the Teacher Email column. I've tried finding duplicates with Conditional Formatting but I have thousands of rows to go through and I can't do that by hand.
DCL611 You are not doing anything wrong, your version of Excel doesn't have dynamic arrays (which means you also don't have some of the new functions that come with it like FILTER(), UNIQUE() and some others). So going back to old school tricks I think this should work for you:
=IFERROR(OFFSET(Ranks!$Y$1,AGGREGATE(15,7, ROW(Ranks!$Z:$Z)/(Ranks!$Z:$Z=$AQ8),COUNTIF($AQ$1:$AQ8,$AQ8))-1,0)," ")
see attached. If it works for you I hope you like and mark this as best answer 🙂
3 Replies
Sort By
- AaronEMTCopper Contributor
This is something I've been trying to figure out off and on for months and I think I just stumbled across it, so for future people having a similar issue, I went to Data, Filter, Advanced Filter, selected the column (in example it's column E) and clicked the check box labelled "Unique Records Only".
While typing this I also got a response, Thank you to wdx223_Daniel for the quick response, that also seems to work and leave the first occurrence as well, so now I have two options!
- Harun24HRBronze ContributorAnother option is to use UNIQUE() function.
- wdx223_DanielBrass Contributor