Find The Smallest Number MISSING from List

Simonc64

Active Member
Joined
Feb 15, 2007
Messages
251
Office Version
  1. 365
Hi Guys, i thought Id found the answer to this with the SMALL function, but either i dont understand how it works or I'm doing something wrong.

Theoretically, I have 2 columns of numbers, lets say the full range of numbers possible is 1 to 11 and these are stored in C1:C11

in Column B I have a random series of numbers, lets say numbers 1,2,4,5 contained in B1:B4..........in B5 I need to find the smallest missing number from the range of possible numbers ie 3 (in this example)

Any help much appreciated
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
This may require CTRL-SHIFT-ENTER:

=SMALL(IF(ISERROR(MATCH(C1:C11,B1:B4,0)),C1:C11),1)
 
Upvote 0
Hi Steve thanks for the reply and solution - oddly that returns 0, and there is'nt a zero in the list of possible numbers available (1-11)
 
Upvote 0
I tried that but the formula wouldnt paste into the cell, when i did it - i copied the formula, clicked in cell B5, pressed CSE then nothing at all...
 
Upvote 0
Id imagine you have a blank cell? Excel will see that as zero. Maybe use:

=SMALL(IF(C1:C11<>"",IF(ISERROR(MATCH(C1:C11,B1:B4,0)),C1:C11)),1)
 
Upvote 0
That returns a 1 - im understanding the logic of the formula now, but not the result
 
Upvote 0
So are you using CSE? If your excel version requires it then this formula wont work without it. You copy the formula. Click a cell. Go to the formula bar. Click at the end of the formula. Press CTRL holding control press SHIFT holding both press enter. You will see { } around the formula.
 
Upvote 0
ok thats what i was doing wrong! - thanks that works really well!! just one last question then around the use of CSE - if i need to copy that formula (lets say on the click of a macro button that copies all formulas in row f1:k1 into f2:k2) how can i ensure that the macro replicates the CSE entry process?
 
Upvote 0
its OK steve ive fixed that - thanks so much for your help much appreciated !!
 
Upvote 0

Forum statistics

Threads
1,214,853
Messages
6,121,935
Members
449,056
Latest member
denissimo

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
Back
Top