Hi All,
Thanks for taking the time to view my post.
I have around 2000 lines of data, and a small sample is shown below.
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Product code[/TD]
[TD]Value[/TD]
[/TR]
[TR]
[TD]I300616729-43376[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD]I300616729-43376[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]I300616729-43474[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]I300616729-43474[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]I300616729-43482[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]I300616729-43482[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD]I300682288-43199[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD]I300682288-43199[/TD]
[TD]1[/TD]
[/TR]
</tbody>[/TABLE]
I would like to rank the value of the product code, but instead of having a rank of 1-8, I want to rank them between themselves, based on the value, so the lower the value (closer to 1), then the higher the ranking . e.g. below
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Product code[/TD]
[TD]Value[/TD]
[TD]Rank[/TD]
[/TR]
[TR]
[TD]I300616729-43376[/TD]
[TD]6[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]I300616729-43376[/TD]
[TD]2[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]I300616729-43474[/TD]
[TD]2[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]I300616729-43474[/TD]
[TD]5[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]I300616729-43482[/TD]
[TD]5[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]I300616729-43482[/TD]
[TD]6[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]I300682288-43199[/TD]
[TD]6[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]I300682288-43199[/TD]
[TD]1[/TD]
[TD]1[/TD]
[/TR]
</tbody>[/TABLE]
Many thanks in advance for your suggestions and solutions. If you require any more info, please do not hesitate to ask.
Thanks for taking the time to view my post.
I have around 2000 lines of data, and a small sample is shown below.
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Product code[/TD]
[TD]Value[/TD]
[/TR]
[TR]
[TD]I300616729-43376[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD]I300616729-43376[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]I300616729-43474[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]I300616729-43474[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]I300616729-43482[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]I300616729-43482[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD]I300682288-43199[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD]I300682288-43199[/TD]
[TD]1[/TD]
[/TR]
</tbody>[/TABLE]
I would like to rank the value of the product code, but instead of having a rank of 1-8, I want to rank them between themselves, based on the value, so the lower the value (closer to 1), then the higher the ranking . e.g. below
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Product code[/TD]
[TD]Value[/TD]
[TD]Rank[/TD]
[/TR]
[TR]
[TD]I300616729-43376[/TD]
[TD]6[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]I300616729-43376[/TD]
[TD]2[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]I300616729-43474[/TD]
[TD]2[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]I300616729-43474[/TD]
[TD]5[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]I300616729-43482[/TD]
[TD]5[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]I300616729-43482[/TD]
[TD]6[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]I300682288-43199[/TD]
[TD]6[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]I300682288-43199[/TD]
[TD]1[/TD]
[TD]1[/TD]
[/TR]
</tbody>[/TABLE]
Many thanks in advance for your suggestions and solutions. If you require any more info, please do not hesitate to ask.