Break in sequence ?

chilidog808

New Member
Joined
Sep 28, 2006
Messages
2
I was posed the question,
"i have a listing of 1000's of sequencial numbers that i have sorted in asending order and I want to find if any numbers are missing in the sequence"

Does anyone know a way this is possible?
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

just_jon

Legend
Joined
Sep 3, 2002
Messages
10,473
Welcome to MrExcel - I hope this is not homework?

One method that flags missing data, assuming data in column A starting in A1, in B2 copied down --

=IF(A2<>A1+1,"Missing at least "A1+1,"")
 

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
50,661
Office Version
  1. 365
Platform
  1. Windows
chilidog808

Welcome to the Mr Excel board!

If you don't need to know what is missing but just IF something is missing, you might be able to use/adapt this:

Formula in D1:
=IF(LOOKUP(9.99999999999999E+307,A:A)-A1+1=COUNT(A:A),"no","yes")
Mr Excel.xls
ABCDE
15Missing numbers?yes
26
37
49
510
612
713
8
Missing Numbers
 

West Man

Well-known Member
Joined
Mar 27, 2006
Messages
1,175
Assuming your sequential numbers start in A1, in row 2 of an unused column type =if(a2>a1+1,"Missing","") Drag this down to your last row.Your request did not reference the possibility for duplicates so no check is made with this formula.
 

Oaktree

MrExcel MVP
Joined
Jun 20, 2002
Messages
8,016
Office Version
  1. 365
If your numbers are in column A,

B1 = MIN(A:A) to find the smallest number in your range
B2 = MAX(A:A) to find the largest number in your range
B3 = SUMPRODUCT(--ISNA(MATCH(ROW(INDIRECT(B1&":"&B2)),A:A,0))) will tell you the number of missing values between B1 and B2
 

Forum statistics

Threads
1,141,718
Messages
5,708,068
Members
421,543
Latest member
SGM

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top