I am trying to rank values in a table that has duplicate names:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Code[/TD]
[TD]Var1[/TD]
[/TR]
[TR]
[TD]123[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]123[/TD]
[TD]1.5[/TD]
[/TR]
[TR]
[TD]222[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]222[/TD]
[TD]3.5[/TD]
[/TR]
[TR]
[TD]222[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]333[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]333[/TD]
[TD]2[/TD]
[/TR]
</tbody>[/TABLE]
The output should look like this:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Code[/TD]
[TD]Rank[/TD]
[/TR]
[TR]
[TD]123[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]222[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]333[/TD]
[TD]2[/TD]
[/TR]
</tbody>[/TABLE]
Is there a clever way to do it instead of going through another table that takes the minimum/average for each unique 'Code' and then ranking these?
Thank you!
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Code[/TD]
[TD]Var1[/TD]
[/TR]
[TR]
[TD]123[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]123[/TD]
[TD]1.5[/TD]
[/TR]
[TR]
[TD]222[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]222[/TD]
[TD]3.5[/TD]
[/TR]
[TR]
[TD]222[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]333[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]333[/TD]
[TD]2[/TD]
[/TR]
</tbody>[/TABLE]
The output should look like this:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Code[/TD]
[TD]Rank[/TD]
[/TR]
[TR]
[TD]123[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]222[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]333[/TD]
[TD]2[/TD]
[/TR]
</tbody>[/TABLE]
Is there a clever way to do it instead of going through another table that takes the minimum/average for each unique 'Code' and then ranking these?
Thank you!