View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dan E[_2_] Dan E[_2_] is offline
external usenet poster
 
Posts: 102
Default 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/