# Sorting duplicate entries based on ranges

#### fdrgiit

##### New Member
</SPAN></SPAN></SPAN></SPAN>Hey Guys,
Consider this scenario.</SPAN>
Consider the following table with these entries:</SPAN>

 Name number1 number2 Abhinav 1 1 Abhinav 1 4 Abhinav 1 1 Abhinav 2 6 Abhinav 1 9 Singh 2 3 Singh 5 5 Singh 6 8 Singh 7 7 Singh 9 9

<TBODY>
</TBODY>

As you can see there are duplicate entries.</SPAN>
I want to sort it in such a way that under the name column I have</SPAN>
All the unique entries and under the other two columns, number1 displaying the</SPAN>
Least value and number2 displaying the highest value pertaining to each unique entry.</SPAN>
Here is an example:</SPAN>

 Name number1 number2 Abhinav 1 9 Singh 2 9

<TBODY>
</TBODY>

If this is possible, it can really help me in generating daily reports.</SPAN>

Thank You</SPAN>

### Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

Put in A13, for unique names:
=IFERROR(INDEX(\$A\$2:\$A\$11,MATCH(0,COUNTIF(\$A\$2:\$A\$11,"<"&\$A\$2:\$A\$11)-SUM(COUNTIF(\$A\$2:\$A\$11,"="&A\$12:A12)),0)),"")

This Array Formula, when ENTER press CTRL-SHIFT-ENTER button together, and then copied down.

For Least Number, put in B13:
=MIN(IF(\$A\$2:\$A\$11=\$A13,\$B\$2:\$B\$11))

Array Formula too, and copied down

For Big Number, put in C13:
=MAX(IF(\$A\$2:\$A\$11=\$A13,\$C\$2:\$C\$11))

Array Formula and copied down

Thanks man it worked perfectly.

Replies
6
Views
165
Replies
0
Views
1K
Replies
8
Views
420
Replies
1
Views
70
Replies
15
Views
492

1,218,560
Messages
6,143,206
Members
450,469
Latest member
brent3162

### 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.

### Which adblocker are you using?

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

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