Right this is going to be hard to explain but im going to give it ago!

I have 2 columns the first is numbered 1 - 8037 the second starts from 1 and end at 8037 but there are various numbers missing

what i need to do it compare the 2 columns and then sort it so i can only see the numbers that are missing. please could someone help i know how to deduplicate using the follow example =if(a1=a2,"yes","no") but i need to the get the columns to be sitting side by side properly as the second column 1 - 8037 with various number missing is bunched together with no gaps and only goes down to cell 5948? if this doesnt make sense please ask me what you dont understand and ill try to explain again!