Excel 2007.
Say I have an array, MyArray = array(2, 4, 6, 10, 4). How can I do a countif() of that array?
Specifically, how could I do:
for i = 1 to 5
j = countif(MyArray, MyArray(i))
.cells(i, 1) = j
next i
So the result would be
1
2
1
1
2
Any thoughts? Thanks in advance!!
Say I have an array, MyArray = array(2, 4, 6, 10, 4). How can I do a countif() of that array?
Specifically, how could I do:
for i = 1 to 5
j = countif(MyArray, MyArray(i))
.cells(i, 1) = j
next i
So the result would be
1
2
1
1
2
Any thoughts? Thanks in advance!!