What is the correct use of MODE()

spcalan

Well-known Member
Joined
Jun 4, 2008
Messages
1,247
I have a column ( 100 rows ) and I need to know what number shows up the most times.

Is mode the correct formula?

I keep getting #NUM! when I use:

=mode(a:a)
 

Some videos you may like

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
Your formula returns the correct results for me using Excel 2007. Perhaps avoid using whole column references in an earlier version

=MODE(A1:A20)
 

roentgen

Board Regular
Joined
Apr 13, 2007
Messages
100
I think you need to be more specific with your range. =MODE(A1:A100) would work. Selecting the whole column, I assume, tries to rationalise all the blank cells to a number, hence the #NUM! error.
 
Joined
Jul 30, 2006
Messages
3,656
roentgen,

This is one way:

Excel Workbook
ABCD
1113
2223
3333
4144
5251
6361
71
82
93
104
114
124
134
145
156
Sheet1



The formula in cell D1 (copied down to the last entry in column C - the unique numbers in column A):
=COUNTIF(A:A,C1)


Have a great day,
Stan
 

mortgageman

Well-known Member
Joined
Jun 30, 2005
Messages
2,015
Your formula returns the correct results for me using Excel 2007. Perhaps avoid using whole column references in an earlier version

=MODE(A1:A20)
I was curious so I just checked as well - I have version 2003. I tried it with the whole column ref and also got a #NUM error. Quite frankly, whole column refs scare me - it seems dangerous and plain lazy to use them. I think it is worthwhile knowing what range you are dealing with.
 

Watch MrExcel Video

Forum statistics

Threads
1,127,768
Messages
5,626,769
Members
416,202
Latest member
donya ba

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top