Forum Discussion
jukhamil
Sep 22, 2021Brass Contributor
Write a custom filter
Is it possible to write a custom filter, either in VBA or just normal Excel filtering functions, rather than using the pre-existing ones in Excel? For example, in Excel you can hide / filter out dupl...
JKPieterse
Sep 22, 2021Silver Contributor
Depends on what your requirement is, are you filtering out duplicate entries in a single column or in a combination of columns?
If a single (and lets assume the data is in cells A2:A100), you can add a column and use a formula like this to count the # of times an item occurs: =COUNTIF($A$2:$A$100,A2)
Then you simply filter your table for that new column on the value 1
If a single (and lets assume the data is in cells A2:A100), you can add a column and use a formula like this to count the # of times an item occurs: =COUNTIF($A$2:$A$100,A2)
Then you simply filter your table for that new column on the value 1
- jukhamilSep 27, 2021Brass ContributorThank you. So this will basically add an additional column which shows if a specific value - the value in cell A2 - occurs in any other cell in that column. That would certainly be a good start, but I would have to then run it for every call value in that column, to catch all the duplicate. Is there some more generalizable way? For example, what if each cell made a relative reference to the cell one space to its left?