I have a dataset (reduced mock version below).
What I'm trying to do is return the column head for the highest count for site. As an example, Site 1 has the highest count of 15.455, so I'd like Type A returned. The 2nd highest value for Site 1 is 9,708 and this would return Type E. I have included a desired outcome table below.
The actual data will have 500 Sites and 100 columns, but I'm only looking for the Top 15 Types.
I had a go using the large formula to return the top nth for each site, but am at a lost how to use this in a lookup.
Mock table below
Desired result
What I'm trying to do is return the column head for the highest count for site. As an example, Site 1 has the highest count of 15.455, so I'd like Type A returned. The 2nd highest value for Site 1 is 9,708 and this would return Type E. I have included a desired outcome table below.
The actual data will have 500 Sites and 100 columns, but I'm only looking for the Top 15 Types.
I had a go using the large formula to return the top nth for each site, but am at a lost how to use this in a lookup.
Mock table below
Site | Type A | Type B | Type C | Type D | Type E |
Site1 | 9,589 | 15,455 | 3,131 | 8,989 | 9,708 |
Site2 | 25,140 | 13,014 | 15,774 | 25,302 | 23,295 |
Site3 | 22,683 | 6,635 | 16,905 | 19,133 | 23,445 |
Site4 | 21,917 | 1,812 | 19,088 | 9,464 | 3,305 |
Desired result
Site | Highest Type | 2nd Highest Type | 3rd Highest Type |
Site1 | Type B | Type E | Type A |
Site2 | Type D | Type A | Type E |
Site3 | Type E | Type A | Type D |
Site4 | Type A | Type C | Type D |