Want to return unique value for each duplicate

Sean15

Well-known Member
Joined
Jun 25, 2005
Messages
698
Office Version
  1. 2010
Platform
  1. Windows

Excel 2010
CDE
3John Paul12.50
4John Paul10.50
5John Paul11.50
6John Paul9.50
7John Paul8.75
8John Paul4.50
9Mike15.75
10John C Paul7.50
11
12
13
14John Paul12.50
15John Paul10.50
16John C Paul9.50
17John Paul8.75
18John Paul4.50
19John Paul#NUM!
20Mike15.75
single lookup value
Cell Formulas
RangeFormula
E14{=INDEX($E$3:$E$10,SMALL(IF($C$14:$C$21=C3,ROW($E$3:$E$10)-ROW($E$3)+1),COUNTIFS($C$3:$C3,$C3)))}
E15{=INDEX($E$3:$E$10,SMALL(IF($C$14:$C$21=C4,ROW($E$3:$E$10)-ROW($E$3)+1),COUNTIFS($C$3:$C4,$C4)))}
E16{=INDEX($E$3:$E$10,SMALL(IF($C$14:$C$21=C5,ROW($E$3:$E$10)-ROW($E$3)+1),COUNTIFS($C$3:$C5,$C5)))}
E17{=INDEX($E$3:$E$10,SMALL(IF($C$14:$C$21=C6,ROW($E$3:$E$10)-ROW($E$3)+1),COUNTIFS($C$3:$C6,$C6)))}
E18{=INDEX($E$3:$E$10,SMALL(IF($C$14:$C$21=C7,ROW($E$3:$E$10)-ROW($E$3)+1),COUNTIFS($C$3:$C7,$C7)))}
E19{=INDEX($E$3:$E$10,SMALL(IF($C$14:$C$21=C8,ROW($E$3:$E$10)-ROW($E$3)+1),COUNTIFS($C$3:$C8,$C8)))}
E20{=INDEX($E$3:$E$10,SMALL(IF($C$14:$C$21=C9,ROW($E$3:$E$10)-ROW($E$3)+1),COUNTIFS($C$3:$C9,$C9)))}
Press CTRL+SHIFT+ENTER to enter array formulas.




This Array with Control, Shift and Enter returns required value except for incorrect value in E16 and #NUM! error in E19. I prefer using a formula without CSE but I haven’t had much luck finding a solution online. Could someone post formula that does not require CSE? Formula also needs to case sensitive to take care of errors in E16 and E19. Thank you very much for your help.
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
In E14 control+shift+enter, not just enter, and copy down:

=IFERROR(INDEX($E$3:$E$10,SMALL(IF($C$3:$C$10=$C14,ROW($E$3:$E$10)-ROW($E$3)+1),COUNTIFS($C$14:C14,C14))),"")

or just enter and copy down:

=IFERROR(INDEX($E$3:$E$10,AGGREGATE(15,6,(ROW($E$3:$E$10)-ROW($E$3)+1)/($C$3:$C$10=$C14),COUNTIFS($C$14:C14,C14))),"")
 
Upvote 0
or just enter and copy down:

=IFERROR(INDEX($E$3:$E$10,AGGREGATE(15,6,(ROW($E$3:$E$10)-ROW($E$3)+1)/($C$3:$C$10=$C14),COUNTIFS($C$14:C14,C14))),"")


Outstanding. Thank you very much.

Is it advisable to replace VLOOKUP formulas with the one shown above (format to suit)?
 
Last edited:
Upvote 0
Outstanding. Thank you very much.

You are welcome.

Is it advisable to replace VLOOKUP formulas with the one shown above?

No, I don't think so. By the way, it's possible to set up fast running look up formulas if the table can be sorted on its match range in ascending order and kept sorted that way.
 
Upvote 0

Forum statistics

Threads
1,215,039
Messages
6,122,802
Members
449,095
Latest member
m_smith_solihull

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