I am referencing my sheet called WatchList and I am looking at the values in column O to find the largest, 2nd largest, 3rd largest, etc. values in that column and returning the corresponding cell in column B.
So if the highest value in column O in the sheet called WatchList is 54, and the corresponding cell in column B is "Pepsi" it will return Pepsi.
This code I use to bring back the 2nd largest:
This works well, except for when the cells in column B have the same numeric value in column O. If they have the same numeric value, for some reason it brigs back only the highest value again.
For instance if "Coke" also has a value of 54 then the 2nd formula above won't bring back "Coke" it will still bring back "Pepsi" for some reason.
I'm not sure why or how to modify the code to fix this issue.
So if the highest value in column O in the sheet called WatchList is 54, and the corresponding cell in column B is "Pepsi" it will return Pepsi.
Excel Formula:
=INDEX(WatchList!B:B,MATCH(MAX(WatchList!O:O,1),WatchList!O:O,0))
This code I use to bring back the 2nd largest:
Excel Formula:
=INDEX(WatchList!B:B,MATCH(MAX(WatchList!O:O,1),WatchList!O:O,0))
This works well, except for when the cells in column B have the same numeric value in column O. If they have the same numeric value, for some reason it brigs back only the highest value again.
For instance if "Coke" also has a value of 54 then the 2nd formula above won't bring back "Coke" it will still bring back "Pepsi" for some reason.
I'm not sure why or how to modify the code to fix this issue.