Formula to remove doubles in excel

vince1985

New Member
Joined
Sep 17, 2015
Messages
13
Office Version
  1. 2016
Platform
  1. Windows
good morning,

I would like to submit an issue i am often facing on Excel.
I am uploading an example hereunder in order to illustrate my request.

I have a 2 entries table and i would like to depict, according to a specific criteria, each of its value only once, without using a pivot table nor vba

In the enclosed example there is a table where one line = one student. Students are in 3 classrooms. I would like to have a formulae showing, for each classroom (which is my criteria then), the different ages of its students (hence only depicting only once the ages that are in double in this classroom).
I have a formula that does the job without criteria. However, I do not know any formula working with a criteria.

Has anyone already faced this case before ?

thank you in advance for your support !
 

Attachments

  • 2022-11-25 08_22_03-Test - Excel.png
    2022-11-25 08_22_03-Test - Excel.png
    18.9 KB · Views: 13

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.
I think the best answer to your question will depend on what Excel version you are using. Therefore I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

It would also greatly assist potential helpers if they had that sample data and expected results in a form that they can easily copy to test with. Therefore, also have a look at XL2BB
 
Upvote 0
shiny new versions of excel its as simple as
Excel Formula:
=FILTER(C:C,B:B=F3,"")
I think that you may have overlooked the thread title (and repeated in the description & sample results) not to list duplicates. I also note that in the expected output the values are sorted.
I would also avoid whole column references in formulas like that.

My suggestion if the dynamic array functions are available is something like this where 100 in the formula just needs to be bigger than any likely data.

22 11 25.xlsm
BCDEFGH
1
2
3A11ABC
4A121121
5A141232
6A121453
7A1164
8A128
9B5
10B8
11B6
12B3
13B2
14B5
15C3
16C1
17C4
18C2
19C3
No dupes
Cell Formulas
RangeFormula
F4:F6,H4:H7,G4:G8F4=SORT(UNIQUE(FILTER($C3:$C100,$B3:$B100=F3,"")))
Dynamic array formulas.
 
Upvote 0
.. and if the dynamic array functions are not available

22 11 25.xlsm
BCDEFGH
1
2
3A11ABC
4A121121
5A141232
6A121453
7A11 64
8A12 8 
9B5   
10B8   
11B6   
12B3
13B2
14B5
15C3
16C1
17C4
18C2
19C3
No dupes (2)
Cell Formulas
RangeFormula
F4:H11F4=IFERROR(AGGREGATE(15,6,$C$3:$C$100/(($B$3:$B$100=F$3)*($C$3:$C$100>MAX(F$3:F3))),1),"")
 
Upvote 0
Solution
many thanks for your feedbacks. I shall try these later today and will then get back to you !
I am using Excel 2016.
 
Upvote 0
as the dynamic array functions are not available (I am going to look at this later), I used the second formula that worked perfectly for me !
Thank you for your help !
(and i have updated my profile)
 
Upvote 0
You're welcome. Thanks for the follow-up. :)

.. and thanks for updating your profile. (y)
 
Upvote 0
Hello everyone,

Thank you again for the formulae above that helped me greatly already.
Due to the formula structure, it works only if the data to be displayed once are numbers. I wanted to know also, how the formula would look like if the data from which we needed to remove duplicates were not numbers (example hereunder) ?
(data do not need to be sorted into a specific order, most important being to remove duplicates)

thank you in advance for your help !


 
Upvote 0

Forum statistics

Threads
1,215,766
Messages
6,126,763
Members
449,336
Latest member
p17tootie

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