C
Connie
I need to count the number of unique employee numbers in a range of
employee numbers. I can use the following excel function to get the
answer, but how do I include this in sub routine?
+sum(n(frequency(c9:c50,C9:c50)>0))
The range will change with each use of the spreadsheet, so I need to
detect the range of values (first row will always be 9, last row must
be determined). I can do that part:
Set sh = Worksheets("Compiled Totals")
Set rng = sh.Range(sh.Cells(9, "C"), _
sh.Cells(sh.Rows.Count, "C").End(xlUp))
I'm not sure how to determine the unique rows once I've determined the
range.
Any help would be appreciated. Thanks.
Connie
employee numbers. I can use the following excel function to get the
answer, but how do I include this in sub routine?
+sum(n(frequency(c9:c50,C9:c50)>0))
The range will change with each use of the spreadsheet, so I need to
detect the range of values (first row will always be 9, last row must
be determined). I can do that part:
Set sh = Worksheets("Compiled Totals")
Set rng = sh.Range(sh.Cells(9, "C"), _
sh.Cells(sh.Rows.Count, "C").End(xlUp))
I'm not sure how to determine the unique rows once I've determined the
range.
Any help would be appreciated. Thanks.
Connie