Monday, 15 March 2010

How to count the number of different items in a range without use a pivot table excel vba -


I have a large range with different repeating IDs. I want to know how many unique IDs are in the category, but I Do not want to use a pivot table. Is related but it does not have an answer. Is this an easy way to use VBA?

I also saw this, but it does not work for me.

Use the dictionary object to load specific values, such as Below:

  Sub Mathematical () Object Dim RNGData Set the integer as the range dim nCounter set oDictionary = CreateObject ("Scripting.Dictionary") rngData = Range ("A1: A10" ) Change the range to correspond to 'ncounter = 0 if not for each cel in RngData oDictionary.exists (cel. Value) then audition. Add cel.Value, 0 nCounter = ncounter + 1 termination if the next cell mybbox nasibine termination sub  

No comments:

Post a Comment