'subtract' a range of numbers from another range

excelNewbie22

Well-known Member
Joined
Aug 4, 2021
Messages
510
Office Version
  1. 365
Platform
  1. Windows
hi!

so i have a long list of 1000 shuffled numbers with duplicates (col a) ,
which always changing,
all from within a range of 1000-1500,
(example 1001,4050, 3182, 4992, 1002, 4050 and so on)

i want to exclude constantly the first 400,
with these 400, i want to delete the duplicates,
and let's say i left with 200 unique numbers (col b),
then 'subtract' these 200's from the 500 unique numbers of the range of 1000-1500,
and then display the remaining 300 in another column (col c)

now, i've already have a way to do it,
with sorting and filtering and condition formatting,
but since i'll need to do so lot's of times,
i wonder can it be done in a shorter way?
maybe with formulas? even several?

i thought something with unique function maybe?



p.s
the range and numbers are just examples,
the originals are different,
and assuming there will be a solution i'll modify it to my needs
 
You originally said that column B was the result of the Unique function, therefore the formula I suggested uses that.
 
Upvote 0

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
right!
it worked!
but only once... then try to save.... and it's stuck,
kill the app, start over, and keep stucking....
 
Upvote 0
Is this any better
Excel Formula:
=LET(b,BASE(SEQUENCE(8^4,,0),8,4)+1111,FILTER(b,ISNA(MATCH(b,B2#,0))))
 
Upvote 0
Solution
it's doesn't stuck but also doesn't filter/subtract from col b, just give the all range from start to end
 
Upvote 0
Filter them out for me
Fluff.xlsm
ABC
1col a
2111111111112
3111311131114
4112111211115
5112311231116
6113111311117
7111811181122
8111113201124
911231125
1011311126
1113201127
121128
131132
141133
151134
161135
171136
181137
191138
201141
Main
Cell Formulas
RangeFormula
B2:B8B2=UNIQUE(A2:A11)
C2:C4091C2=LET(b,BASE(SEQUENCE(8^4,,0),8,4)+1111,FILTER(b,ISNA(MATCH(b,B2#,0))))
Dynamic array formulas.
 
Upvote 0
right again... i copied yours and it's works perfectly!
but when i do the same with my file nothing changing...
weird!
 
Upvote 0
Are you sure the numbers in col B are real numbers & not text?
 
Upvote 0
you are onto something.... when i try changing one of them in col a manually it works, but only for the one change manually,
but when i copied the entire range to col a from the data file, the formula in col c don't work

so.... what do you mean by REAL numbers?
 
Upvote 0
I mean numbers rather than text.
 
Upvote 0
yes, numbers only,
i tried copy some into here,
preview it,
then copy back,
and it worked,
why is that?
 
Upvote 0

Forum statistics

Threads
1,215,692
Messages
6,126,226
Members
449,303
Latest member
grantrob

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