Hello jiminic,
In your last post, is the data in 2 columns or just one? Will the data always be starting in row 3? Are the "MDp" and "XML" portions to be considered when testing for uniqueness?
Sincerely,
Leith Ross
Hello jiminic,
In your last post, is the data in 2 columns or just one? Will the data always be starting in row 3? Are the "MDp" and "XML" portions to be considered when testing for uniqueness?
Sincerely,
Leith Ross
Hi Leith
I really appreciate your help with this one.
The data is in 2 columns, and yes the data will always be starting in row 3. The "MDp" and "XML" portions are not to be considered when testing for uniqueness, only the actual data in row 1.
Hello jiminic ,
This macro will count only the unique values in the leftmost column of a selected range or the range supplied to it by code.
Sincerely,![]()
Function GetUniqueCount(Rng As Range) Dim Cell As Range Dim Cnt As Long Dim DSO As Object 'Use only the first column of the selected range Set Rng = Rng.Resize(Rng.Rows.Count, 1) Set DSO = CreateObject("Scripting.Dictionary") DSO.CompareMode = 1 For Each Cell In Rng If Cell <> "" Then If Not DSO.Exists(Cell.Text) Then DSO.Add Cell.Text, Cell Cnt = Cnt + 1 End If End If Next Cell Set DSO = Nothing GetUniqueCount = Cnt End Function
Leith Ross
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks