Hi

One way could be this with your numbers starting in A1.

First sort the numbers from minimum to maximum.

Then in B2, put this formula and copy down.

=IF(A2=A1+1,"OK","Missing Invoice")