Hi guys,
I am trying to find the consecutive numbers in a range but I only manage to get the result for one consecutive number only.
For example,
with range 1,2,3,5,6,9,18,19 the result should be 3-2-2 because there are 3 consecutive numbers (1,2,3), then 2 consecutive numbers (5,6), then another 2 consecutive numbers (18,19)
A few more examples,
with range 1,2,5,6,8,9,11,12 the result would be 2-2-2-2
with range 1,2,3,4,7,8,10,13 the result would be 4-2
with range 1,2,3,5,6,9,10,12 the result would be 3-2-2
If this can be done with either a macro or a formula it would be great. Thank you for looking!
Bookmarks