View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default Mark the first Unique Record in a list with VBA

Hi Johan,

Am Fri, 28 Aug 2020 03:17:45 -0700 (PDT) schrieb :

I've got a list with column A, B, C. In Column.D want to have an "1" when the combined fields "A&B&C" are the first unique in the list.
If in another row the same combination "A&B&C" occur then report in that row in Column.D a "0".
I know that there are some countifs/array formulas for it, but when having many rows it makes it very slow. A VBA is faster in this cases.


you don't need an array formula.

Try it in D1 with:
=--(COUNTIFS(A$1:A1,A1,B$1:B1,B1,C$1:C1,C1)=1)


Regards
Claus B.
--
Windows10
Office 2016