meghaAgrawal
Programmer
I have an Excel column. Is there a way I can count number of distinct values appearing in that column?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
[blue]Selection.FormulaArray = "=Sum(1/CountIf(" & charges.Address(, , xlR1C1) & "," & charges.Address(, , xlR1C1) & "))"[/blue]
[blue]Dim charges As String
charges = Range(Cells(1, 1), Cells(10, 1)).Address(, , xlR1C1)
Range("J1").FormulaArray = "=SUM(1/COUNTIF(" & charges & "," & charges & "))"
numCharges = Cells(1, "J").Value[/blue]