Sequential list validating...

AWS

Staff member
Jan 10, 2007
Florida
if I have a list, lets say of months, or years or weeks...

What is the best way to validate that the list is sequential?

Example, lets assume a list contains month numbers.

10
9
8
5
4
3

I can ignore 12 and 11 since*10 is the top most value, and I can ignore 2 and 1 since 3 is the bottom most value.

but I want to insert the missing between values of 7 and 6, because there a values above and below it.

I have a way of accomplishing this, by looping a few times through the list, but it doesn't seem very intuitive or efficient.

any thoughts?


More...

View All Our Microsft Related Feeds
 
Back
Top Bottom