C
Casey
Hi everyone,
I have a Named Range (IdColumn) which contains a list of integer
values. This range varies from being blank, (containing no numbers) to
containing hundreds of values sorted Acsending. These values are always
whole numbers.
What I need is a routine for finding the lowest missing number. If the
Range is empty then return the value 1 in a msgbox. If it contains say
1,2,3 it would return 4 in a msgbox. If the range contained
1,2,3,4,5,6,7,8,9,11,12,13,15,16 it would return the lowest missing
value which would be 10 even though 14 is also missing.
I have a Named Range (IdColumn) which contains a list of integer
values. This range varies from being blank, (containing no numbers) to
containing hundreds of values sorted Acsending. These values are always
whole numbers.
What I need is a routine for finding the lowest missing number. If the
Range is empty then return the value 1 in a msgbox. If it contains say
1,2,3 it would return 4 in a msgbox. If the range contained
1,2,3,4,5,6,7,8,9,11,12,13,15,16 it would return the lowest missing
value which would be 10 even though 14 is also missing.