Extract unique data based on criteria

Shindaria

New member
Joined
Jun 5, 2018
Messages
2
Reaction score
0
Points
0
Location
Ontario, Canada
Excel Version(s)
2016
Hello,

I have been reading this forum for a while and got some amazing hints on my Excel problems. But now I am truly stuck.
I have a table that looks something like this:
Case NumberAnimal
47Cat
47Cat
47Dog
50Cat
50Cat
50Pig
50Pig
50Pig
51Cat
I would like to get this
Case NumberAnimal
47Cat
47Dog
50Cat
50Pig
51Cat

Unfortunate part because this is a part of the bigger set up I cannot use VBA and I can't use "Remove duplicates" options from Excel. I am ok using an array formula. The result will need to be on the different sheet.

You guys rock!
Thanks for the help in advance.
 
Last edited:
You can add a helper column in C2 with Array formula:

=IFERROR(INDEX($A$2:$A$10&"_"&$B$2:$B$10,MATCH(0,INDEX(COUNTIF(C$1:C1,$A$2:$A$10&"_"&$B$2:$B$10),0),0)),"")

copied down.

Then in the other sheet you can use formulas:

=IFERROR(LEFT(Sheet2!C2,FIND("_",Sheet2!C2)-1),"")

and

=IFERROR(MID(Sheet2!C2,FIND("_",Sheet2!C2)+1,255),"")

next to each other and copied down (where Sheet2 has original data and helper formula)

then in other sheet
 
You rock! Thank you so much! I've been racking my brain for a week now. You solution is incredibly slick and pretty. Thank you!:cheer2::typing:
 
Back
Top