Author Topic: Another Formula  (Read 1690 times)

Coop

  • Newbie
  • *
  • Posts: 2
    • View Profile
Another Formula
« on: June 20, 2006, 05:03:10 PM »
I thought I'd share a formula that I finally got working for me.

Here are the rules we are using for points in our league.

1. Base points awarded for reverse order of finish.  1st gets n, 2nd gets n-1, etc
2. Any time there are more than 24 players in the tournament, there is a final table bonus of 10 points for the top 8.
3. We have a bounty of 25 points for the previous tournament winner, I added this in the prize section.
4. Finally, as long as there is at least 8 entries, the top 1/3 get bonus points based on the size of the tourny and their finish.
   For example, in a 24 person tourny, the top 8 get bonus points of (number of qualifiers - rank + 1) * (number of entrants)
   The number of qualifiers is the top 1/3 of players.


(n - r + 1)
+
(if(n > 23 , (if(r < 9 , 10 , 0)) , 0))
+
(if(n > 7 , (if(r < ((n + 1) / 3) , (n*(ROUND((n + 1)/ 3) - r + (if((n%3=0),1,0)) )), 0)) , 0))


Coop

Coop

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Another Formula
« Reply #1 on: June 22, 2006, 06:28:30 PM »
I finally read the help guide, and found a simpler way to write this.  Originally, I found functions by trial and area, and didn't see a way to ROUNDUP, so I implemented
that on my own, but now I see there is a CEIL function which does what I wanted.

(n - r + 1)
+
(if(n > 23 , (if(r < 9 , 10 , 0)) , 0))
+
(if(n > 7 , (if(r < ((n + 1) / 3) , (n*(CEIL((n + 1)/ 3) - r )), 0)) , 0))