This compares each value in the named range "group" against the value in E5, which is "A". Because the logical test is applied to an array with multiple values, the result is an array of TRUE FALSE values:
where each TRUE corresponds to a row where the group is "A". This array becomes a filter. For each TRUE, IF returns the corresponding value in the named range "data". FALSE values remain unchanged. The final result of IF is this array:
Notice only values in group A have survived, group B values are now FALSE. This array is returned to the MODE function, which automatically ignores FALSE values and returns the most frequently occurring number, which is 3.
Note: when IF is used this way to filter values with an array operation, the formula must be entered with control + shift + enter.
To apply more than one criteria, you can nest another IF inside the first IF:
To find the most frequently occurring number in a range, you can use the MODE function. In the example shown, the formula in M4 is: = MODE ( B4:K4 ) How this formula works The MODE function is fully automatic and will return the most frequently...
To list the most frequently occurring numbers in a column (i.e. most common, second most common, third most common, etc), you can an array formula based on four Excel functions, IF, MODE, MATCH, and ISNUMBER. In the example shown, the formula in D5...
To extract the word or text value that occurs most frequently in a range, you can use a formula based on several functions INDEX, MATCH, and MODE. In the example shown, the formula in H5 is: = INDEX ( B5:F5 , MODE ( MATCH ( B5:F5 , B5:F5 , 0 ))) How...
Formulas are the key to getting things done in Excel. In this accelerated training, you'll learn how to use formulas to manipulate text, work with dates and times, lookup values with VLOOKUP and INDEX & MATCH, count and sum with criteria, dynamically rank values, and create dynamic ranges. You'll also learn how to troubleshoot, trace errors, and fix problems. Instant access. See details here.