Zend certified PHP/Magento developer

Excel Related = labeling a field

I am trying to create a formula that will look at an employees Total Direct Compensation $S against the market 50-75%ile $s, and it if their Total Direct Compensation is 5-10% greater than the 50%ile of the market it would deliver a label in the field = P50 – P75. It the total Total Direct Compensation is less then the 50%ile of the market $s it would deliver a label in the field =
P25-P50