Hi,

I've been trying to figure this out for a while now. Few hours to be exact. I have a list of codes and their respective values. For each code I need to pick out the Min, Median, Max and Percentile 90 value.

So was trying to write a code to highlight the positions for each code.

Now, Percentile 90 (and even median in case of even number of values) might not be a value from the list given. In such cases I would need to highlight the value closest to the actual percentile.

Eg. if values are 100, 120, 135, 160, 195, 210, 215 - Percentile 90 would mathematically be 212. Here I would select the closest value ie. 210.

I have attached a text file.

Here there are 2 columns. One with Codes (A, B, C) and the other with values. In the actual scenario I might have multiple columns/Conditions.

Would be great if someone could help me out! :-)

Test.xlsx