Sorting of Parameters according to their values

debapratim1

New Member
Joined
Nov 2, 2017
Messages
5
Hi All,

I am facing a problem while sorting a group of Objects according to their values. When multiple values entered are same, then Only the First Object is being returned thrice. While I want all the objects to be returned with same values. Please help.

Demo:

[TABLE="width: 213"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD]Objects[/TD]
[TD]Avg Value[/TD]
[/TR]
[TR]
[/TR]
[TR]
[TD]OBJ 1[/TD]
[TD]121[/TD]
[/TR]
[TR]
[TD]OBJ 1[/TD]
[TD]121[/TD]
[/TR]
[TR]
[TD]OBJ 8[/TD]
[TD]125[/TD]
[/TR]
[TR]
[TD]OBJ 11[/TD]
[TD]126[/TD]
[/TR]
[TR]
[TD]OBJ 2[/TD]
[TD]133[/TD]
[/TR]
[TR]
[TD]OBJ 9[/TD]
[TD]135[/TD]
[/TR]
[TR]
[TD]OBJ 10[/TD]
[TD]136[/TD]
[/TR]
[TR]
[TD]OBJ 3[/TD]
[TD]154[/TD]
[/TR]
[TR]
[TD]OBJ 6[/TD]
[TD]172[/TD]
[/TR]
[TR]
[TD]OBJ 4[/TD]
[TD]177[/TD]
[/TR]
[TR]
[TD]OBJ 5[/TD]
[TD]181
[/TD]
[/TR]
</tbody>[/TABLE]

Here Object 1 and Object 7 are having the same value but Object 1 is returned twice.

I have used the formula: =INDEX($C$5:$C$99,MATCH($H5,$D$5:$D$15,0))
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Hi ,

Try this :

=INDEX($C$5:$C$99 , SMALL(IF($D$5:$D$99 = $H5 , ROW($D$:$D$99) - MIN(ROW($D$:$D$99)) + 1) , COUNTIF($H$5:$H5 , $H5)))

This is an array formula , to be entered using CTRL SHIFT ENTER.

In case it does not work , please mention the worksheet references for your do $C$5:$C$99 , $D$5:$D$99 , $H5 contain ? Where will this formula be entered , and how will it be copied to other cells ?
 
Upvote 0
Hi ,

Try this :

=INDEX($C$5:$C$99 , SMALL(IF($D$5:$D$99 = $H5 , ROW($D$:$D$99) - MIN(ROW($D$:$D$99)) + 1) , COUNTIF($H$5:$H5 , $H5)))

This is an array formula , to be entered using CTRL SHIFT ENTER.

In case it does not work , please mention the worksheet references for your do $C$5:$C$99 , $D$5:$D$99 , $H5 contain ? Where will this formula be entered , and how will it be copied to other cells ?

Hi,
Thanks for your help. Can you please help me with the logic so that I can implement it accordingly? Actually, the data is a little complex and many parameters are there. By applying many formulae I got this table.

Again thanks for immense help.
 
Upvote 0
Hi ,

If you can describe how your data is laid out , I can explain.

First , you need to confirm whether the posted formula works.
 
Upvote 0
Exception%20Tool_Test%20-%20Excel_2017-11-02_15-29-14.png


I want the objects to be arranged according to its respective values. Please let me know if u have any questions.
 
Upvote 0
[TABLE="width: 492"]
<colgroup><col><col span="3"><col><col></colgroup><tbody>[TR]
[TD]OBJ 1[/TD]
[TD="align: right"]121[/TD]
[TD][/TD]
[TD][/TD]
[TD]OBJ 1[/TD]
[TD]121[/TD]
[/TR]
[TR]
[TD]OBJ 2[/TD]
[TD="align: right"]133[/TD]
[TD][/TD]
[TD][/TD]
[TD]OBJ 1[/TD]
[TD]121[/TD]
[/TR]
[TR]
[TD]OBJ 3[/TD]
[TD="align: right"]154[/TD]
[TD][/TD]
[TD][/TD]
[TD]OBJ 8[/TD]
[TD]125[/TD]
[/TR]
[TR]
[TD]OBJ 4[/TD]
[TD="align: right"]177[/TD]
[TD][/TD]
[TD][/TD]
[TD]OBJ 11[/TD]
[TD]126[/TD]
[/TR]
[TR]
[TD]OBJ 5[/TD]
[TD="align: right"]181[/TD]
[TD][/TD]
[TD][/TD]
[TD]OBJ 2[/TD]
[TD]133[/TD]
[/TR]
[TR]
[TD]OBJ 6[/TD]
[TD="align: right"]172[/TD]
[TD][/TD]
[TD][/TD]
[TD]OBJ 9[/TD]
[TD]135[/TD]
[/TR]
[TR]
[TD]OBJ 7[/TD]
[TD="align: right"]121[/TD]
[TD][/TD]
[TD][/TD]
[TD]OBJ 10[/TD]
[TD]136[/TD]
[/TR]
[TR]
[TD]OBJ 8[/TD]
[TD="align: right"]125[/TD]
[TD][/TD]
[TD][/TD]
[TD]OBJ 3[/TD]
[TD]154[/TD]
[/TR]
[TR]
[TD]OBJ 9[/TD]
[TD="align: right"]135[/TD]
[TD][/TD]
[TD][/TD]
[TD]OBJ 6[/TD]
[TD]172[/TD]
[/TR]
[TR]
[TD]OBJ 10[/TD]
[TD="align: right"]136[/TD]
[TD][/TD]
[TD][/TD]
[TD]OBJ 4[/TD]
[TD]177[/TD]
[/TR]
[TR]
[TD]OBJ 11[/TD]
[TD="align: right"]126[/TD]
[TD][/TD]
[TD][/TD]
[TD]OBJ 5[/TD]
[TD]181[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Hi ,

Please either describe how your data is laid out , with specific worksheet cell / range / row / column references , or use the tools available on this forum to display your worksheet layout , or upload your workbook to some public file sharing service and share the access link here.
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,241
Members
452,622
Latest member
Laura_PinksBTHFT

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