Count Quantity of Specific Number Patterns in Column

KennyT

New Member
Joined
Oct 17, 2013
Messages
9
Hi. First time posting a help request. Spent endless hours trying to get this to work, but to no avail. Maybe someone can assist.

Need to know the formula for counting how many times a certain number follows another given number in the same column. Per my example, how many times does the number '5' follow the number '100'? The answer should be '3'. In the actual spreadsheet, the number combos will vary (it is not always these two numbers). It is possible that numbers will be greater or less than the one preceding it. I assume one might use "COUNTIF", but having trouble getting the formula to focus on one row below a particular number.

Thanks for your help in advance!

100
5
27
5
13
100
5
100
10
5
100
5
26
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
It works! I am not sure how that formula achieves the goal, but it seems to do the job. I will apply it to the full spread sheet to test it out in the "real world."

Your time is greatly appreciated. Thanks so much! You are a genius!
 
Upvote 0
It works! I am not sure how that formula achieves the goal, but it seems to do the job. I will apply it to the full spread sheet to test it out in the "real world."

What it does is:

A2 = E2 and A3 = F2 --> 1, otherwise 0;
A3 = E2 and A4 = F2 --> 1, otherwise 0; And so on.

Your time is greatly appreciated. Thanks so much! You are a genius!

You are welcome. Thanks for providing feedback.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,326
Members
452,635
Latest member
laura12345

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