Author Topic: Need help with formula  (Read 98 times)

Kirkidoo

  • Newbie
  • *
  • Posts: 3
    • View Profile
Need help with formula
« on: September 23, 2021, 10:34:30 AM »
Hello everyone,

I need help creating a formula for our tournament. We play once a week for 12 weeks.
The way the points system work is first player out to rank 11 goes up by one points.
10 to 6 goes up by 2 points. 5 and 4 by 3. 3rd place +5, 2nd +7, 1rst +10.

At the end of the 12 weeks position 16 to 8 in the ranking make final B. The 2 winner of the B join the first 6 rank player to make the final A.

I attach the file we use to determine how many points player gets.

Thank you!

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6004
    • View Profile
Re: Need help with formula
« Reply #1 on: September 23, 2021, 10:57:22 AM »
lswitch(r, 10, 7, 5, 3, 3, 2, 2, 2, 2, 2, 1)

Only notable thing here is that everyone ranking higher than 10 gets 1 point.  Your sheet only goes to 20, but in the event there are more players they will also receive 1 point.

Kirkidoo

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Need help with formula
« Reply #2 on: September 23, 2021, 12:29:05 PM »
Its not exactly that.

The first player out gets 1 points. The player after that gets +1 pts so 2 pts.

So if we are 15 players it goes like this :

1st = 43 pts
2nd = 33 pts
3rd = 26 pts
4 = 21 pts
5 = 18 pts
6 = 15 pts
7 = 13 pts
8 = 11 pts
9 = 9 pts
10 = 7pts
11 = 5 pts
12 = 4pts
13 = 3 pts
14 = 2 pts
15 = 1pts

So its +1 to rank 11. +2 for 10 to 6, +3 for 5 and 4, +5 for third, +7 for second and +10 for first.

Also we're already two weeks into the series. Can I add the points the player already has in the database. I think I say a post before that I have to redo the tournament.

Thank you for taking the time.

Kirkidoo

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Need help with formula
« Reply #3 on: September 23, 2021, 02:01:52 PM »
Well I made alot of try and this is the formula I came up with

if(rank >= 11, n - r + 1, switch(rank, 1, n - r + 29, 2, n - r + 20, 3, n - r + 14, 4, n - r + 10, 5, n - r + 8, 6, n - r + 6, 7, n - r + 5, 8, n - r + 4, 9, n - r + 3, 10, n - r + 2,))

I'm sure its too long for nothing but it works!

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6004
    • View Profile
Re: Need help with formula
« Reply #4 on: September 23, 2021, 05:22:31 PM »
I see now.  Here's a simpler version:

position + lswitch(rank, 28, 19, 13, 9, 7, 6, 5, 3, 2, 1, 0)