Formula to count consecutive numbers in each row of a data source

anonymouspottamus

New Member
Joined
Oct 7, 2023
Messages
4
Office Version
  1. 2016
Platform
  1. MacOS
What excel formula would I use to count how many consecutive numbers there are in each row of my data source? The data source is A2:E183.

Example:
Row A2 has numbers 13 14 21 28 31
Row A3 has numbers 18 23 29 30 31

How do I find the number of consecutive numbers in row A2?

How do I find the number of consecutive numbers in row A3?
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
According to the following examples, what result do you want in each row:

Libro1
ABCDEF
1
21314212831
31823293031
41011293031
51011143031
613579
712345
81020212223
Hoja1


Important: Explain the logic you use to count.

I hope to hear from you soon.
Respectfully
Dante Amor
---------------
 
Upvote 0
According to the following examples, what result do you want in each row:

Libro1
ABCDEF
1
21314212831
31823293031
41011293031
51011143031
613579
712345
81020212223
Hoja1


Important: Explain the logic you use to count.

I hope to hear from you soon.
Respectfully
Dante Amor
---------------
Thank you. I'm trying to count the number of natural consecutive numbers (n+1) that are in each row,
In my data source, no row has more than 3 natural consecutive numbers in it.

In your example:
Row A2 has 2 consecutive numbers
Row A3 has 3 consecutive numbers
Row A4 has 5 consecutive numbers
 
Upvote 0
In my data source, no row has more than 3 natural consecutive numbers in it.
So, if it's not too much to ask of you, you could put a representative sample of your information, the result in each row and a description of your logic for counting.

Help us help you by providing complete information.
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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