How to identify missing numbers sequence in Excel?

Let's say you have a long list of sequence numbers to mark items, such as check numbers in bank statements, normally we scrolling through and locate the missing sequence numbers manually. Sometimes this is quite arduous and time-consuming. You may think of tricky ways to deal with it. Yes, there are several easy ways to identify and locate missing numbers sequence in Excel 2007, Excel 2010, and Excel 2013 quickly and conveniently.

Identify missing numbers sequence with IF formula

Identify missing numbers sequence with an array formula

Identify missing numbers sequence with Kutools for Excel quickly

Insert unique sequence numbers to cells with Kutools for Excel


Find and highlight missing numbers from sequence:
Kutools for Excel’s Find Missing Sequence Number feature can helper you quickly and easily find the missing sequence, and insert the missing numbers or blank rows into the existing data sequence, or fill background color when encountering the missing sequence. Read more details about this feature...

doc-identify-missing-numbers17


arrow blue right bubble Identify missing numbers sequence with IF formula


As we all known, most of sequence numbers are with fixed increment of 1, such as 1, 2, 3, …, N. Therefore, if you can identify the number is not less 1 than its following number, there is a missing number.

We will show you the tutorials with an example as following screenshot shows:

doc-identify-missing-numbers1

1. In a blank cell, enter the formula of =IF(A2-A1=1,"","Missing"), and press the Enter key. In this case, we enter the formula in Cell C1.

doc-identify-missing-numbers2

If there is no missing numbers, this formula will return nothing; if missing numbers exist, it will return the text of "Missing" in active cell.

2. Select the cell C1 and drag the fill handle over the range of cells that you want to contain this formula. Now it identifies the missing numbers with the text of "Missing" in corresponding cells of Column C. See the following screenshot:

doc-identify-missing-numbers3


arrow blue right bubble Identify missing numbers sequence with an array formula

Sometimes it requires not only identifying missing numbers sequence, but also listing missing numbers too. You can deal it with following steps:

1. in the adjacent cell, please enter the formula = SMALL(IF(ISNA(MATCH(ROW(A$1:A$30),A$1:A$30,0)),ROW(A$1:A$30)),ROW(A1))

A1:A30 = range of numbers

The sequence to check against is 1 to 30

2. Press the Ctrl + Shift + Enter Keys together to finish the formula. Copy down the formula until you get #NUM! errors meaning all missing numbers have been listed. See screenshot:

doc-identify-missing-numbers4


arrow blue right bubble Identify missing numbers sequence with Kutools for Excel quickly

The above methods only can identify the missing pure number sequence, if you have the sequence such as AA-1001-BB, AA-1002-BB, they may not work successfully. But, don't worry, Kutools for Excel’s powerful feature – Find Missing Sequence Number can help you quickly identify the missing sequence.

Kutools for Excel : with more than 120 handy Excel add-ins, free to try with no limitation in 60 days. 

After installing Kutools for Excel, please do as follows:( Free Download Kutools for Excel Now

1. Select the data sequence that you want to find the missing sequence.

2. Click Kutools > Insert > Find Missing Sequence Number, see screenshot:

doc-identify-missing-numbers8

3. In the Find Missing Sequence Number dialog box, choose one option that you want to deal with the missing sequence number, this example, I will check Inserting new column with following missing marker. See screenshot:

doc-identify-missing-numbers8

4. Then click OK button, all the missing sequence numbers have been marked with Missing in a new column next to your data, see screenshot:

doc-identify-missing-numbers8

Note:

With this Find Missing Sequence Number utility, you can also finish the following operations:

Insert the missing sequence numbers into the exiting data;

Insert blank rows when encountering missing sequence number;

Shade the missing sequence number with background color.

Free Download Kutools for Excel Now


arrow blue right bubble Insert unique sequence numbers to cells with Kutools for Excel

Sometimes, you may need to insert a list of unique continuous sequence numbers with specific prefix and suffix, such as KTE-201500001-Order, KTE-201500002-Order, KTE-201500003-Order…, how could you generate theses consecutive numbers quickly and easily in Excel workbook?

Kutools for Excel : with more than 120 handy Excel add-ins, free to try with no limitation in 60 days.

After installing Kutools for Excel, please do as follows:( Free Download Kutools for Excel Now

1. Select a list of cells that you want to insert the sequence numbers.

2. Click Kutools > Insert > Insert Sequence Number, see screenshot:

doc-identify-missing-numbers8

3. In the Insert Sequence Number dialog box, click New button to start create the sequence numbers, see screenshot:

doc-identify-missing-numbers8

4. Then the Insert Sequence Number dialog will be expanded, in the left bottom pane, create your own sequential numbers as you need. You should type the sequence name, start number, increment, number of digits, and then enter the prefix or suffix as you like. At the same time, you can preview the result of your customized sequence in the right bottom list box. See screenshot:

doc-identify-missing-numbers8

5. Then click Add button to add this customized sequence into above list box, select the item you are created, and click Fill Range button, see screenshot:

doc-identify-missing-numbers8

6. Now, the sequence numbers have been inserted the selected cells as following screenshot shown:

doc-identify-missing-numbers8

Notes:

1. You can generate other sequence numbers just by clicking New button to create a new one.

2. The unique sequence numbers can be insert into contiguous cells and non-contiguous ranges in different worksheets and workbooks followed by the previous inserted number.

Click to know more about this Insert Sequence Number feature.

Free Download Kutools for Excel Now


Recommended Productivity Tools

Office Tab

gold star1 Bring handy tabs to Excel and other Office software, just like Chrome, Firefox and new Internet Explorer.

Kutools for Excel

gold star1 Amazing! Increase your productivity in 5 minutes. Don't need any special skills, save two hours every day!

gold star1 200 New Features for Excel, Make Excel Much Easy and Powerful:

  • Merge Cell/Rows/Columns without Losing Data.
  • Combine and Consolidate Multiple Sheets and Workbooks.
  • Compare Ranges, Copy Multiple Ranges, Convert Text to Date, Unit and Currency Conversion.
  • Count by Colors, Paging Subtotals, Advanced Sort and Super Filter,
  • More Select/Insert/Delete/Text/Format/Link/Comment/Workbooks/Worksheets Tools...

Screen shot of Kutools for Excel

btn read more      btn download     btn purchase

Comments  

Permalink 0 ROBERT123
Hi all....

Here you are finding missing numbers and pasting into other sheet...

But i need to findout missing rows insted of missing numbers...and i need it to paste that missing rows into a new sheet...

is there any solution for me.....

Thnaks
2013-11-20 12:07 Reply Reply with quote Quote
Permalink +1 KALPANA
hi
i need to find missimg number in total no of book.
i have 20000 book in my library . i have tally 18000 no of book .iam find the miss no's of books.
sir pleace help me.
2014-06-20 09:04 Reply Reply with quote Quote
Permalink +1 Chetan
Press Alt+F11 button to open VB Screen, Press Insert then Module and paste above mentioned code and Press F5, it'll show you all the Missing nos in adjacent coloum, if your Acc.No. Start with letter like B, replace it with 0, & then do above operation.
2014-06-23 08:27 Reply Reply with quote Quote
Permalink 0 ROBERT123
my report is like this....

iam uploading an excel file called abc into another excel called xyz....

That excel file abc rows directly writes into my Database...upto here i'm ok....

i need solution like this below....

no of rows read from abc excel while uploading into xyz excel...
no of rows inserted into database from abc excel...
if any rows while inserting into databse missing i need a message like "some rows were not inserted"
i need those missing rows into separate sheet

my code is in VBA,macros only...
2013-11-20 12:14 Reply Reply with quote Quote
Permalink +2 Sreenivasulu Reddy
This script was not executed, compile error generator as "With WS.Sort"
2013-11-25 05:09 Reply Reply with quote Quote
Permalink 0 C N Murthy
1. VB script is not working as the same returned error as "With WS.Sort" as reported earlier by Mr.Reddy.

2. The formula =SMALL is working for series starting from 1 and NOT for series starting from say 201 to 535. Then this formula is returning all missing nos. starting from 1 whereas ideally we want the missing nos. within the range from 201 to 535.
2013-12-16 09:44 Reply Reply with quote Quote
Permalink 0 Satya
Dear Sir,
It is working fine sir,
I put this formula in excel VB module , later I saved as *.xla.
now pl help me, how to use it?
2014-01-02 04:29 Reply Reply with quote Quote
Permalink 0 bobo
Great VBA code! Thank you very much for it.

As I have no idea about how to create a VBA code, could you please let me know if there is any chance to adapt this code to my needs as follows:
1. the selected range to be by default (e.g. $C$2:$C$5000);
2. the new worksheet to have only the column with the missing numbers (and without "missing values" header);
3. to be able to add exceptions (e.g. numbers 4550432, 4552357, etc) that will not displayed in the new worksheet;
4. if some missing numbers are subsequently added in the original worksheet, these numbers to be automatically erased from the new worksheet, without running again the macro;
5. when I run again the macro, to create the same worksheet, with a particularly name.

Thank you so much in advance!
2014-02-07 16:33 Reply Reply with quote Quote
Permalink 0 Dlady
The instructions are clear about how to add the VB code... it is very easy.
2015-11-17 23:41 Reply Reply with quote Quote
Permalink +2 Farooq
I really enjoyed by executing all three functions in my excel sheet. It was marvelous.
2014-02-24 10:47 Reply Reply with quote Quote
Permalink +1 midnightsquall
I tried the VBA code, and it doesn't work for dates. By that I mean if the range of data I'm using to determine for missing values is in the format: dd/mm/yyyy as opposed to a single integer. Is there an alteration to the VBA code that allows for the same process to be carried out?

I used the =IF function and that works fine, but I'd be keen to get it working with the macros as well.
2014-03-04 01:59 Reply Reply with quote Quote
Permalink +1 shanmugasundaram
Hi sir,

It is working and very useful this formula thank you
2014-03-13 05:30 Reply Reply with quote Quote
Permalink +1 Srikant.n
Thank you, it was a very useful tool as i had to search 1 missing number in 1-7000.

thanking you once again
2014-03-24 05:13 Reply Reply with quote Quote
Permalink +1 Hama Chigubu
It worked for me, many thanx!!! :-)
2014-04-01 09:41 Reply Reply with quote Quote
Permalink 0 Valda
Awesome. It worked. Grateful
2014-04-25 17:55 Reply Reply with quote Quote
Permalink 0 Chetan Sonawane
I want to find missing numbers starting from B00001 to B11223 which starts with alphabets, kindly send code for this.
2014-04-30 11:08 Reply Reply with quote Quote
Permalink 0 jawale Jyotsna
Dear Sir,
I want to find out missing numbers starting from S-1 to S-30,000 and J-1 to J-7000, U-1 to U-26932 and C-1 to C-1836 please send code, Thanking You. :-)
2014-05-26 08:24 Reply Reply with quote Quote
Permalink 0 jawale Jyotsna
Dear,
I want to find out missing numbers from S-1 to S-27000 and J-1 to J-7000 , U-1 to U-27000, C-1 to C-1848
2014-05-26 08:26 Reply Reply with quote Quote
Permalink 0 jawale Jyotsna
Dear sir
I want to find out d missing numbers from S-1 to S-27000 and J-1 to J-6500. Please send me the vba code for d same
Thaniking you,

Jawale Jyo
2014-05-26 11:23 Reply Reply with quote Quote
Permalink 0 jawale Jyotsna
This script was not executed, compile error generator as "With WS.Sort"
2014-05-26 11:34 Reply Reply with quote Quote
Permalink +1 jawale Jyotsna
Dear sir
I want to find out d missing numbers from S-1 to S-27000 and J-1 to J-6500. Please send me the vba code for d same.
The code available on net , when executed gives compilation error with WS.Sort
Thaniking you,

Jawale Jyo
2014-05-26 11:35 Reply Reply with quote Quote
Permalink 0 marty
will any of these work for phone numbers if I'm looking for phone numbers that are missing in a sequence?
2014-07-16 16:03 Reply Reply with quote Quote
Permalink 0 Ashish
"You can find out the missing number in array by following algorithm:

/* getMissingNumbe r takes array and size of array as arguments*/
int getMissingNumbe r (int arr[], int num)
{
int i;
/* For xor of all the elemets in arary */
int x1 = a[0];
/* For xor of all the elemets from 1 to n+1 */
int x2 = 1;

for (i = 1; i< n; i++)
x1 = x1^a;

for ( i = 2; i
2014-07-22 08:19 Reply Reply with quote Quote
Permalink 0 Bruce
The =small(if(isna> >>>>>>>> formula causes my excel programe to lock up and cease to function. Any Ideas folks.
2014-08-01 00:44 Reply Reply with quote Quote
Permalink 0 Bruce
The =small(if(isna> >>>> formula causes excel to lock up. Any ideas folks?
2014-08-01 00:46 Reply Reply with quote Quote
Permalink 0 Chris
Is there a way to include a blank row for each missing number without losing the format/data
2014-08-29 19:34 Reply Reply with quote Quote
Permalink 0 Shivi Bhatia
Hi Sir,

This example above is nothing short of a miracle similar to what a pace maker is to a heart patient. Cant express my thanks in words but you are a god saver
2015-04-22 06:00 Reply Reply with quote Quote
Permalink 0 Shivi
Hi, After using the missing formula I am able to find how many values are missing from my data. However when I try to find what exact values (numbers) are missing its giving me an error. I have more than 7700 rows of data missing. Now these values missing are from multiple cheque book and each cheque book has 50 leafs. These 7700 are the missing leafs and missing numbers are in no order. By no order I mean 1st cheque or 2nd or 5th 35th 48th number anything could be missing. Plus I cannot even define a range as in case above. What should I do, please advice.
2015-04-24 05:36 Reply Reply with quote Quote
Permalink 0 Rick
Thats a beautiful post however the VBA macro code has a serious error, when you give it start and end number, it misses many randomly and thus the missing number list is incorrect. For example : in 1 to 100, I found 67 is not generated hence the missing number list never list 67 even if its not there.

Any idea how to fix it ?
2015-05-07 08:50 Reply Reply with quote Quote
Permalink 0 Faizan
[google]send formul[/google]
2015-11-27 15:42 Reply Reply with quote Quote
Permalink 0 Sekhar
its good working but this formula very big how can remember this = SMALL(IF(ISNA(M ATCH(ROW(A$1:A$ 30),A$1:A$30,0) ),ROW(A$1:A$30) ),ROW(A1))
2016-03-29 05:00 Reply Reply with quote Quote
Permalink 0 Mansur
Thank u Mannnnnn . Cheers
2016-04-27 11:59 Reply Reply with quote Quote
Permalink 0 sanchit Bhardwaj
Hello Community and excel Gurus;

I wan to search missing numbers in a row of excel ,I tried to use the Kutool for excel ,After selecting the option to find missing numbers ,i am getting error the range can only contain number or text ?Though the range or row i had selected contains only number.
Any expert advice ?

Best,
Sanchit Bhrdwaj
2016-11-18 09:40 Reply Reply with quote Quote

Add comment


Security code
Refresh