Below is an VBA function to calculate unique values count (Credit to SO: Count unique values in Excel) is it possible to add criteria paramaters? Like in the function "countifs"?
Public Function CountUnique(rng As Range) As Integer
Dim dict As Dictionary
Dim cell As Range
Set dict = New Dictionary
For Each cell In rng.Cells
If Not dict.Exists(cell.Value) Then
dict.Add cell.Value, 0
End If
Next
CountUnique = dict.Count
End Function
If Not dict.Exists(cell.Value) Then
adding your conditions there. Something likeIf Not dict.Exists(cell.Value) And cell.value > Parameter1 And cell.value < Parameter2 Then...
Just an example – Foxfire And Burns And Burns