Hi All,
Thanks again for your previous help on RANKIf without arrays. I am still working with the same basic model and had a new question. I currently have the first four columns of the table below. I am looking to create SalesmanInOrder which is simply a list of the salesman for a product in order from largest to smallest (i.e. in the example below a3 is the top apple salesman so he goes at the top of the apple list, followed by a1, then a2. I suspect this involves INDEX and/or MATCH, but I can't seem to make it work. As before, all the Apples salesman are together in the dataset, followed by all the Bananas, etc. Each product can have between 6 and 12 rows. I tried a VLOOKUP, but am unsure how to specify the first and last row for the lookup.
Thanks in advance.
[TABLE="class: cms_table, width: 500"]
<tbody>[TR]
[TD]Salesman[/TD]
[TD]Product[/TD]
[TD]PredOutPut[/TD]
[TD]SalesRank[/TD]
[TD]SalesmanInOrder[/TD]
[/TR]
[TR]
[TD]a1[/TD]
[TD]Apples[/TD]
[TD]5.1[/TD]
[TD]2[/TD]
[TD]a3[/TD]
[/TR]
[TR]
[TD]a2[/TD]
[TD]Apples[/TD]
[TD]4.7[/TD]
[TD]3[/TD]
[TD]a1[/TD]
[/TR]
[TR]
[TD]a3[/TD]
[TD]Apples[/TD]
[TD]8.3[/TD]
[TD]1[/TD]
[TD]a2[/TD]
[/TR]
[TR]
[TD] b1[/TD]
[TD]Bananas[/TD]
[TD]7.3[/TD]
[TD]2[/TD]
[TD]b3[/TD]
[/TR]
[TR]
[TD]b2[/TD]
[TD]Bananas[/TD]
[TD]6.3[/TD]
[TD]3[/TD]
[TD]b1[/TD]
[/TR]
[TR]
[TD]b3[/TD]
[TD]Bananas[/TD]
[TD]9.5[/TD]
[TD]1[/TD]
[TD]b2[/TD]
[/TR]
</tbody>[/TABLE]
Thanks again for your previous help on RANKIf without arrays. I am still working with the same basic model and had a new question. I currently have the first four columns of the table below. I am looking to create SalesmanInOrder which is simply a list of the salesman for a product in order from largest to smallest (i.e. in the example below a3 is the top apple salesman so he goes at the top of the apple list, followed by a1, then a2. I suspect this involves INDEX and/or MATCH, but I can't seem to make it work. As before, all the Apples salesman are together in the dataset, followed by all the Bananas, etc. Each product can have between 6 and 12 rows. I tried a VLOOKUP, but am unsure how to specify the first and last row for the lookup.
Thanks in advance.
[TABLE="class: cms_table, width: 500"]
<tbody>[TR]
[TD]Salesman[/TD]
[TD]Product[/TD]
[TD]PredOutPut[/TD]
[TD]SalesRank[/TD]
[TD]SalesmanInOrder[/TD]
[/TR]
[TR]
[TD]a1[/TD]
[TD]Apples[/TD]
[TD]5.1[/TD]
[TD]2[/TD]
[TD]a3[/TD]
[/TR]
[TR]
[TD]a2[/TD]
[TD]Apples[/TD]
[TD]4.7[/TD]
[TD]3[/TD]
[TD]a1[/TD]
[/TR]
[TR]
[TD]a3[/TD]
[TD]Apples[/TD]
[TD]8.3[/TD]
[TD]1[/TD]
[TD]a2[/TD]
[/TR]
[TR]
[TD] b1[/TD]
[TD]Bananas[/TD]
[TD]7.3[/TD]
[TD]2[/TD]
[TD]b3[/TD]
[/TR]
[TR]
[TD]b2[/TD]
[TD]Bananas[/TD]
[TD]6.3[/TD]
[TD]3[/TD]
[TD]b1[/TD]
[/TR]
[TR]
[TD]b3[/TD]
[TD]Bananas[/TD]
[TD]9.5[/TD]
[TD]1[/TD]
[TD]b2[/TD]
[/TR]
</tbody>[/TABLE]