=iferror(MODE(IF(AJ15:AJ24<>0,AJ15:AJ24)),"")
If your formula does not result in an error then the result of your formula is displayed. When your formula generates an error, "" or nothing is displayed.
Answer from Forward Ed on Stack OverflowI'm trying to create a mode if formula. I have an array of data for which I'm looking for the mode of certain variables. Basically, I'm looking to create a table using the mode values for the criteria.
I have tried using the following function: =MODE(IF([DATA ARRAY]=COMPARATIVE VALUE,DATA))
But, I have been unable to get it to work, despite using ctrl, shift, enter.
I need help to figure this out.
MODE not working with named range
Mode formula not working - Stack Overflow
Mode.Mult Function not working
My mode(if formula is returning #N/A no matter what I try.
Videos
The problem has to do with list separators. For some reason, my machine had the tab character \t as the list separator. I have no idea how this happened and I certainly don't remember doing it.
I went in to the Control Panel -> Region -> Additional Settings. Then I changed it to comma and all is well!
Before:
After:
To get to the root of the problem, start in a blank cell, then click the Formulas ribbon, Math & Trig dropdown and select the MOD() function. Fill in the number and the divisor and look at the formula that Excel puts in the formula bar.
That will be the syntax you need to use. Confirm the dialog and compare the formula with the one you entered manually.
If you get an error after confirming this dialog, then there is a more serious problem.