Does the implementation of the "inthemoney" formula entry help out with simplifying my nested if formulae? This is what I have so far:

=IF(r=1,(n-r)+7,IF(r=2,(n-r)+5,IF(r=3,(n-r)+4,IF(r=4,(n-r)+3,IF(r=5,(n-r)+2,(n-r)+1))))), where the top 5 are in the money.