Hi Max!
Thank you very much for this. It seems to work. However, some results are
returned as #VALUE! I have double-checked all numbers follow the same
format, but I cannot think of what's causing this. It's odd, as it works
for most of it, with a few #VALUE! errors thrown amongst the results.
Can you help at all?
Thank you
gb
"Max" <(E-Mail Removed)> wrote in message
news:#(E-Mail Removed)...
One try ..
Assuming "Full List" is in col A, data from row2 down
Put in B2: =IF(A3-A2=1,"",A2)
Put in B3: =IF(AND(A3-A2=1,A4-A3=1),"",A3)
Copy B3 down
This should return the "Sorted List" in col B
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <at>yahoo<dot>com
----
"gb" <(E-Mail Removed)> wrote in message
news:#(E-Mail Removed)...
> Hello everyone
>
> I have a number of sheets each containing a list of numbers. Should this
be
> important, each number is always 11 digits in length and they all start
with
> a 0.
>
> Many of the numbers are sequential, where the last digit increments by 1.
>
> What I would like to do for those numbers that are part of a range is to
> find the first and last number of that range. Is there a formula that
could
> read through the list one by one and make a separate list of each unique
> number and the first and last number where the numbers are sequential?
>
> As an example, using completely made up numbers:
>
> Full list Sorted list
> 01265875698 01265875698
> 01285489657 01285489657
> 01354123452 01354123452
> 01354123453
> 01354123454
> 01354123455
> 01354123456
> 01354123457 01354123457
> 01546985444 01546985444
> 01546985445
> 01546985446 01546985446
> 01978542667 01978542667
>
> I hope what I'm asking makes sense.....but is there a way? 
>
> Many thanks
>
> gb
>
>