Hi

If I have a range

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

my macro should pick up the start range as 1 and end range as 15

if the range is

1 3 4 5 6 9 11 12 13 14 15

my macro shoul pick up

1 as a start 1 ,3 as start2 range and 5 as end2 , 9 as start3, 11 as start 4 and 15 as end15

if the range is

1 2 3 4 7 9 10 11 12 13 then

1 is start1 4 is end1, 7 is start2, 9 is start3 13 is end3

or even if my macro can high light the ones in color it is fine

Basically identify a range and pick the start and end for each of the range and delete the inbetween numbers and retain the number which doesnt belong to the continuous series