OK, I am hitting a wall with my points for playing formula, so I submit to you folks, for any kid of help...

**buyins + rebuys – rank**

I'm looking to calculate 1 point for every player you outlast in a tournament. I've added a single optional rebuy to my structure and would like to incorporate that into the formula, but only for rebuys that happen *before* a given player busts himself. I don't know how to formulate WHEN a rebuy occurs, so I may calculate how many *buyins* a player outlasted, rather than how many *players* a player outlasted.

For example: Jimmy plays in a tournament that has 20 players and allows a single optional rebuy. Jimmy busts out in 18th place, but 3 other players have rebought before he busts out. In addition, 5 other players have rebought AFTER he's already out of the tournament. In this case, Jimmy's points should be 5 (2 for ranking 18th out of 20, plus 3 for the rebuys he outlasted), not 7 (buyins + rebuys - rank).

Any help is greatly appreciated.