I have a lengthy list of numbers (almost 6000 rows). The list alternates between sequential and non-sequential. I need to take this:

Col A

10021
10022
10040
10060
10061
10080
10081
10120
10121
10140
10160

And make it look like this:

Col A Col B

10021 10022
10040 10040
10060 10061
10080 10081
10120 10121
10140 10140
10160 10160

So, I need it to look at the 1st number (10021), find the last number that is sequential (10022) and populate it in the column next to the 1st number. It then needs to start with the next number (10040) and do the same. In this case, there is no sequential number after 10040 so it would populate that same number next to it. There could be any number of sequential numbers to find or none (as in the case of 10040). I hope that makes sense - it was harder to put that into words than I thought it would be!

Does anyone have any ideas?