mode of range containing some empty cells?

nicknicknickandnick

New Member
Joined
Apr 29, 2002
Messages
29
Is there a way to apply the mode function to a range of cells that may sometimes contain cells with non-numeric text or are empty? When I try to do that, I get the #N/A error. I only want the mode for the cells within the range that contain numbers, and have other cells of the range ignored.
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
In your testing, is it possible that you do not have a single number that exists more than once?

If I have 1 in A1, nothing in A2, a in A3, and 1 in A4, and in B1 type in =mode(A1:A4), I get 1. If I replace the 1 in A1 with 2, then I get #N/A since there is no duplicate number.

Can you replicate this?
 
Upvote 0
OK, that actually works, thanks. My problem is something different than I thought, it seems. I'm trying to get the mode based on the entire contents of one sheet to show up on another sheet. It doesn't work when I reference the whole sheet (clicking the upper left thing), but it does work when I select a part of the sheet. The error I get is #NUM!. I'd like to reference the entire sheet.
 
Upvote 0
Looks like a limitation of the program. I can get it to do all but one row:
=MODE(Sheet1!1:65535)
or
=MODE(Sheet1!2:65536)

It does not seem to work with an entire column. I.e. =MODE(A:A) yields #NUM!.

It seems you can get around this limitation by splitting the range up, for instance:
=MODE(Sheet1!1:2,Sheet1!3:65536)
 
Upvote 0

Forum statistics

Threads
1,203,460
Messages
6,055,556
Members
444,797
Latest member
18ecooley

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
Back
Top