MODE after expecific number

fjgg4se

New Member
Joined
Oct 2, 2017
Messages
8
hi

i have a list of ramdom numbers between 0 and 9, and i got a table where i want to find the mode of 1st, 2nd and 3th most common number after a expecfic number.

k5z6rG
https://ibb.co/k5z6rG
k5z6rG
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Hello

I'm not understanding your question 100% and would prefer if you posted the full question here - in years to come that link may not work and people looking at this thread won't have the full context.

There is an in-built function in Excel to get the mode value.

Assuming the data is in cells B2:B16 then the mode is calculated like this:
=MODE(B2:B16)

To get the 2nd mode (in other words the second most frequent number), you can use an array formula like this where the value from the first formula is in cell F2:
{=MODE(IF(B2:B16<>F2,B2:B16))}
This is an array formula - do NOT enter the curly brackets{}, instead enter the formula without the curly brackets and before you press the Enter key, instead press Ctrl & Shift and while holding these 2 keys down then press the Enter key. The curly brackets will appear automatically in the formula bar.

To get the 3rd mode, the array formula looks like this:
{=MODE(IF(B2:B16<>F2,IF(B2:B16<>F3,B2:B16)))}
same deal with the Ctrl + Shift + Enter.
Again, this assumes the first mode has already been worked out in cell F2 and the second mode value has been worked out in cell F3.

I trust this helps.
Andrew
 
Last edited:
Upvote 0
I have noticed that all your previous questions have been about "Google Sheets" and not "Excel".
Is this an Excel or Google Sheets question?

Note, for all your Google Sheets questions, you should do the following:
- Post them to the "General Excel Discussion & Other Questions" forum
- Include "GOOGLE SHEETS" in the title of your post, to alert people that this is a question about Google Sheets

Thank you
 
Upvote 0
Solution for next number using only formulas:


Book1
ABCDEF
1LISTMODE exactly afterMODE in the next 9 numbersSecond most common in the next 9Third most common number in the next 9 numbers
2502
3415
4723
5832
6941
7657
8363
9278
10189
11596
127
130
149
156
165
174
181
192
203
213
225
237
247
258
269
272
280
292
305
317
328
335
346
356
368
374
389
395
407
415
420
432
443
456
469
478
487
494
501
515
529
538
547
556
563
572
585
594
Sheet1
Cell Formulas
RangeFormula
C2{=MODE(IF($A$1:$A$58=$B2,$A$2:$A$59))}
Press CTRL+SHIFT+ENTER to enter array formulas.


I suspect the other three columns require VBA but there's no point suggesting this if you're using Google Sheets.

WBD
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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