I have a hard time excluding a value from my mode.simple formula...

New Contributor

Hello everyone!


Complete beginner with excel here and I would like to get help figuring out how to exclude a certain value from my mode.simple formula.




So let's say I have cells ranging from a1 to c10

So for the purpose of an exercise I have found the most frequent value using the mode.simple formula using =mode.simple(a1:c10) 


Let's say the most common value was 4.


Now that I have the result, I want to find the second most frequent value and here is the problem.

I tried using the =mode.simple(if(a1:c10 <>4,a1:c10)) , but excel won't let me proceed with the formula, giving me a pop-up window saying there is an error with my formula and asking if I'm trying to do a formula or not.

I tried creating an array formula using ctrl+shift+enter instead, but it gives me the same error...


Any advices please?


Thank you in advance!



2 Replies

@Phoenux Perhaps this will work for you.

Screenshot 2022-06-12 at 05.58.57.png

 =MODE.SNGL(IFERROR((1/(A1:C10<>MODE.SNGL(A1:C10))*A1:C10),"")) where the part,


1/(A1:C10<>MODE.SNGL(A1:C10))*A1:C10) "copies" the array replacing the most frequent number with #DIV0!


Then, IFERROR(-----------, "") replaces the errors with a blank. And finally, you use MODE.SNGL one more time to find the most frequent number in the array with the blanks, thus being the second most frequent number from the original array.

File attached.






Thanks for responding!


I ended up finding another method this morning to give me the results I wanted.


In case it can help others, here is what I used:




And for multiple exclusions:




Thanks for the help!