I\'ve spent most of the day playing around with the below formula, trying to understand exactly how it works and modifying it as required however have not been completely succes