Hi,
I hope someone could help me out with an interpretation of a code I found:
I have a column with random numbers (in cells A2 to A10) and I have to find out the order of their frequency (into column C) in descending order. I have found one solution to the problem and it helped.
(link: https://www.mrexcel.com/forum/excel-...ing-array.html
and the answer was provided by T.Valko)
I pasted the code into my excel file and was able to obtain the most frequent values in my range in a descending order which is great.
My question here is if someone could help me interpret the line of code that was used:
={IFERROR(INDEX(A$2:A$10,MODE(IF(COUNTIF(C$2:C2,A$2:A$10)=0,MATCH(A$2:A$10,A$2:A$10,0)+{0,0}))),"")}
I know how INDEX and MATCH works together, I also know how COUNTIF works and I am familiar with ARRAYS in general, but in the above function I do not understand the following:
1. COUNTIF: by syntax this function requires RANGE and CRITERIA, but in the above code there are two ranges given. How does it work then?
2. MATCH: same as with COUNTIF, by syntax it needs a LOOKUP VALUE and an ARRAY, but above the code has the same range given for both LOOKUP VALUE and ARRAY. How does it work whats ists purpose?
3. Lastly, within the MODE part there is an addition of {0,0}, without which the function does not work. I know its an array, but no idea of its significance here.
Thanks in advance for any help/ guiance on this
Bookmarks