Count Uniques in Column G Until Change in Column C, then RestartC
On Nov 6, 11:09 am, ryguy7272
wrote:
I have a list of names in Column C and a list of duplicate and/or unique IDs
in Column G. I'm trying to find a way to count all unique numbers in Column
G, for each person listed in Column C (data is sorter by Column C). Any
ideas?
I posted in the Excel - Functions area earlier, and TM provided this solution.
=SUMPRODUCT((C1:C100<"")/COUNTIF(G1:G100,G1:G100&""))
I think this will work, but my data set is quite large and Excel runs very
slow when I implement this solution (and I'm only using the function on 1/5
of the data). There must be a better way of doing this, right.
Thanks,
Ryan---
--
RyGuy
I don't have a function.
I use Scripting.Dictionaries in VBA to do things like this. Using a
dictionary is faster that using a collection. I would use one
dictionary to manage the unique items in column C, where the key would
be the name in column C and the values would be another dictionary to
hold all of the ID's in column G (key and value = ID).
If this might be an acceptable approach, and you are not familiar with
dictionaries, post back & I will spend more time to rough something
out.
|