Need formula that will sort and display all duplicate values (bc each value has a unique corr. name)

HolliIsAwesome

New Member
Joined
May 17, 2018
Messages
4
Gawrsh I bombed that one. Did y'all go cross-eyed readin that title... :eek:

Mkay, so I have a spreadsheet set up that I use for scoring tests. It will automatically update each indice's numerical score for each unique corresponding name. So, often it has the same score - but because there are no duplicate names, I need to list each one.

For ex, here is a pic... in this example, there are 4 unique names for 2 sets of dups... the order that the dups are in does not matter, I just need both "77"'s to display each with their own name, and both "30"'s to display likewise.

https://drive.google.com/file/d/1H6Gq_pfRDhBdFfmnfJN1NfK0cBJOzC-0/view?usp=sharing

I've tried match, but that stops at the first finding and goes no further for me. I don't want to mess with finding a row number so the countifs or others that require a row number are not gonna work. I need a formula or formulas that are a one and done type thing.

Thank y'all *tips hat*
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Hi again!

Yeah, I did have to read the title a few times. :confused: But I think I finally figured it out.


I'm having a terrible time trying to show a formatted screen print. But based on your sample workbook, use these formulas:

AC3:
Code:
=LARGE($Z$3:$Z$11,ROWS($Z$3:$Z3))

AA3:
Code:
=INDEX($X$3:$X$11,SMALL(IF($Z$3:$Z$11=AC3,ROW($Z$3:$Z$11)-ROW($Z$3)+1),COUNTIF($AC$3:$AC3,$AC3)))
and confirm that one by pressing Control+Shift+Enter. Copy down both formulas as needed.


The LARGE formula is not too bad, but the INDEX formula is pretty tricky!

Hope this helps!
 
Upvote 0
woooooooooooooooooooooooooow you DID IT oh Mylanta....

thank you!!! my goodness I would have never ever got that... not anytime soon that's for sure! you are ze best!

can you please 'xplain to me about the long formula (fit right in with my title quite nicely!) so I can have a take away from this? like an English translation :LOL:
 
Upvote 0
FWIW, if you don't want to worry about the C+S+E confirmation (& remember it if you edit the formula) you can use (for col AA) this slight variation that just requires normal entry.

Excel Workbook
XYZAAABAC
3Distemper56Alexithymia81
4Extraversion30Disinhibition77
5Neuroticism67Conscientiousness77
6Sel-Esteem43Neuroticism67
7Disinhibition77Distemper56
8Narcissism39Sel-Esteem43
9Alexithymia81Narcissism39
10Agreeableness30Extraversion30
11Conscientiousness77Agreeableness30
List Dupes



Also, for future reference, you will get many more potential helpers if you post any sample data in small screen shots directly in your post. That way people do not have to go to another site to look and also they can copy your sample data to a worksheet to test (most helpers don’t like having to type out test data). My signature block has a link for several ways to do that. Test them in the Test Here forum. That way, if something goes wrong, you won’t be messing up a main forum.
 
Upvote 0
I don't know how much you know about array formulas, but the basic idea is that they work look at a range of cells, which creates an internal array, then some additional functions look at the array and narrow down the results to a single value.

=INDEX($X$3:$X$11,SMALL(IF($Z$3:$Z$11=AC3,ROW($Z$3:$Z$11)-ROW($Z$3)+1),COUNTIF($AC$3:$AC3,$AC3)))

In this case, the part in red looks at every cell in the range Z3:Z11 and sees which ones match AC3, the current value returned by the LARGE formula. If they match, it returns the rows of the matching values, converted to an offset (blue). So for a value of 77, the array looks like:

{FALSE;FALSE;FALSE;FALSE;5;FALSE;FALSE;FALSE;9}

At this point, the COUNTIF kicks in, and it counts how many times we've seen 77 in column AC so far, (note the relative referencing), which will be 1 or 2 depending on the row. Say we're on row 5, so we count 77 2 times in AC3:AC5. Then the SMALL function takes the second smallest value from the array, ignoring non-numeric values, giving us 9, then the INDEX looks that up.

Hope this makes sense!
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,241
Members
449,075
Latest member
staticfluids

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