List all numbers between 2 numbers that don't appear in another column

PeteBrown

New Member
Joined
May 23, 2022
Messages
4
Office Version
  1. 365
Platform
  1. Windows
Hi,

I have a number in A2 [0400000000] and another number in A3 [0401000000].
I have a list of numbers in another column - B - each of which are also between these two numbers in A1 & A2.

How do I print out in Column C all the numbers available between A2 & A3 that have not been used already in Column B?

Furthermore - as we use available numbers from Column C they will be added to the end of the list in Column B - so the available numbers in Column C should dynamically adjust when a number is added to Column B.

thx in advance !!
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Welcome to the Forum!

How do your numbers increment? If you allow 0400000001, 0400000002, 0400000003 .... , then you'll have a million numbers in columns B and C?
 
Upvote 0
Hi - thanks for the reply!!

How do your numbers increment? - yes they will increment by 1.

I'd be happy to have only the first 500 or 1,000 available numbers be provided at a time - is there a way to include a fixed number of numbers to be presented as part of the solution?
 
Upvote 0
Sorry for the typo above .. I meant to say:
========================================
Hi - thanks for the reply!!

How do your numbers increment? - yes they will increment by 1.

I'd be happy to have only the first 500 or 1,000 available numbers be provided at a time - is there a way to include a fixed number to be listed as part of the solution?
 
Upvote 0
Like this?

ABCDEF
1RangeUsedAvailableN15
2040000000004000000030400000000
3040100000004000000040400000001
404000000060400000002
504000000070400000005
604000000080400000009
704000000100400000011
804000000130400000012
904000000170400000014
1004000000180400000015
1104000000200400000016
1204000000230400000019
1304000000270400000021
1404000000280400000022
150400000024
160400000025
17
Sheet1
Cell Formulas
RangeFormula
D2:D16D2=LET(s,SEQUENCE(A3-A2+1,,A2),INDEX(FILTER(s,ISERROR(MATCH(s,Used,))),SEQUENCE(N)))
Dynamic array formulas.
Named Ranges
NameRefers ToCells
N=Sheet1!$F$1D2
Used=Sheet1!$B$2:$B$14D2


I have assumed your numbers 0400000000 etc are actually numeric, not text.
 
Upvote 0
Solution

Forum statistics

Threads
1,214,620
Messages
6,120,554
Members
448,970
Latest member
kennimack

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