ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Formula Help Needed (https://www.excelbanter.com/excel-programming/278867-formula-help-needed.html)

Michael168[_28_]

Formula Help Needed
 
I use a spreadsheet to keep records of lottery results in the range(A:F)
exlucding the bonus ball.
I need a formula to tell me how many in the row are consecutive numbers
in the row and keep the answer in cell H-M

e.g.

A B C D E F H I J K L M
11 12 22 24 27 28 2-1-1-1-1
10 12 25 33 39 41 1-1-1-1-1-1

Thanks for the help.
Michael168



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/


Dan E[_2_]

Formula Help Needed
 
Michael,

Not sure if this is exaclty what your looking for...

In H1 put 1 (it will always be 1 consecutive number for
the first number)
In I1 put =IF(B1=A1+1,H1+1,1) and copy through col M.
drag down for as many rows as needed (watch the 1 in
col H it might increment...)

for your example it produces
1 2 1 1 1 2
1 1 1 1 1 1

Not quite what you wanted but close.

Dan E

"Michael168" wrote in message ...
I use a spreadsheet to keep records of lottery results in the range(A:F)
exlucding the bonus ball.
I need a formula to tell me how many in the row are consecutive numbers
in the row and keep the answer in cell H-M

e.g.

A B C D E F H I J K L M
11 12 22 24 27 28 2-1-1-1-1
10 12 25 33 39 41 1-1-1-1-1-1

Thanks for the help.
Michael168



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/




Michael168[_30_]

Formula Help Needed
 
Hello Dan E,

Thanks for the try.
But the order of the answer is not correct.
It looks like something related to the combin formula.

Thanks
Michael168



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/



All times are GMT +1. The time now is 06:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com