'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
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
test.xlsx
ABC
1col acol b -exculde first 5col c - exclude col b num's from the entire range=1000-1500
2100010001001
3101110111003
4100210021004
5102210221005
610111006
712501007
814001008
910111009
1014991010
1113201012
12and etc….1013
131014
141015
151016
161017
171018
181019
191020
201021
211023
221024
23and so on
test
Cell Formulas
RangeFormula
B2:B5B2=UNIQUE(A2:A6)
Dynamic array formulas.
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A:ACell ValueduplicatestextNO
 
Upvote 0
How about
Excel Formula:
=WORKDAY.INTL(999,SEQUENCE(501-ROWS(B2#)),"0000000",B2#)
As you have the Unique function, I would suggest that you update your profile, as it is not available in xl 2013
 
Upvote 0
superb!
i yet to manage to apply it to my needs
cause my range of numbers start at 1111 to approx 4511 (with no 0's or 9's)
will this effect the formula?
and also my col b is with shuffled numbers, so it won't be in order (never)
 
Upvote 0
There is always an alternative, but I have no idea what unless you can supply accurate information on what you are trying to do.
 
Upvote 0
range is 1111 to 8888 (with no 0's or 9's)
the amount of numbers for this range is 4096
col a is approx 6000 numbers incl duplicates
col b is approx 3000 unique numbers from col a
col c is the result of which the entire range mention (1111-8888) MINUS col b
 
Upvote 0
Ok, how about
Excel Formula:
=LET(w,WORKDAY.INTL(1110,SEQUENCE(7782-ROWS(B2#)),"0000000",B2#),FILTER(w,(ISERR(FIND(0,w)))*(ISERR(FIND(9,w)))))
 
Upvote 0
probably my end of doing somthing wrong so i post an example
also, i can't post thousands of numbers so only sample some (col b)

test
ABC
1unique numbers
21317#REF!
34726
45812
53147
61247
74442
84131
93464
104588
112711
122788
131822
144738
152244
164357
176322
186268
196442
205256
211746
228147
test
Cell Formulas
RangeFormula
C2C2=LET(w,WORKDAY.INTL(1110,SEQUENCE(7782-ROWS(B2#)),"0000000",B2#),FILTER(w,(ISERR(FIND(0,w)))*(ISERR(FIND(9,w)))))
 
Upvote 0

Forum statistics

Threads
1,215,487
Messages
6,125,073
Members
449,205
Latest member
Healthydogs

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