calculate how many times a number follow by another appears

Orochi78

New Member
Joined
Mar 14, 2020
Messages
2
Office Version
  1. 2019
Platform
  1. Windows
Can someone help with the formula to calculate how many times a number follow by another appears.
I have 10.000 spins numbers from 0-36 in one column, this is from roulette wheel spins.

This is as example

After number 1

Number 1 appears 8x
Number 2 appears 7x
Number 3 apeears 10x


111.jpg
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
For example:
ORICHI78-MR-01.jpg

Sequence is in column A; your "Base Number" is in E1 and the sequence 1-36 is in E2:E37
Insert in F2 the formula
Code:
=SUM(--($A$2:$A$100000&"_"&$A$3:$A$100001=$E$1&"_"&E2))
It need to be confirmed by Contr-Shift-Enter, not Enter alone
Then copy F2 downward
Bye
 
Last edited by a moderator:
Upvote 0
For example:
ORICHI78-MR-01.jpg

Sequence is in column A; your "Base Number" is in E1 and the sequence 1-36 is in E2:E37
Insert in F2 the formula
Code:
=SUM(--($A$2:$A$100000&"_"&$A$3:$A$100001=$E$1&"_"&E2))
It need to be confirmed by Contr-Shift-Enter, not Enter alone
Then copy F2 downward
Bye
thks alot, it done the job!
 
Upvote 0
Welcome to the MrExcel board!

You could also use this which is a more efficient function and doesn't require the special entry confirmation.

20 03 16.xlsm
ABCDEF
1SequenceBase22
217Followed by18
3725
42237
52649
62157
72267
833713
9987
10892
1112109
129117
Following
Cell Formulas
RangeFormula
F2:F12F2=COUNTIFS(A$3:A$10001,E2,A$2:A$10000,E$1)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,213,564
Messages
6,114,334
Members
448,567
Latest member
Kuldeep90

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