Quote Originally Posted by xld
MIN, MAX and MEDIAN are just straight-forward formulae, for PERCENTILE90 you can use this array formula

=MAX(IF(C3:C64>PERCENTILE(C3:C64,0.9),C3:C64))
Hi,

I know the formula's! :-)

However, with a long list (going into 100 different codes and 100000+ values) I needed a code to highlight the required values (say, in yellow) so I can delete all the other values.

The formula would give me the values which I would have the look up individually and delete the rest.

Therefore the VBA

Cheers,