Author Topic: Formula Help Please  (Read 1183 times)

Mesnik44

  • Jr. Member
  • **
  • Posts: 73
    • View Profile
Formula Help Please
« on: July 28, 2015, 03:10:03 PM »
Hello,

I would like some help with a formula please.

Currently I have this; switch(r,1,11,2,10,3,9,4,8,5,6,6,5,7,4,8,3,9,2,10,1,0). This is for standings. 10 players. Points range from 11 to 1 in order of placing.

I would like to add a formula to this that you get minus 2 (-2) points for each rebuy, and you can not go below 1 point. Is this at all possible?

Thank you in advance.

John.

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Formula Help Please
« Reply #1 on: July 29, 2015, 02:15:01 PM »
Sure:

max(1, switch(r,1,11,2,10,3,9,4,8,5,6,6,5,7,4,8,3,9,2,10,1,0) - (2 * nr))

Just subtract 2 for each rebuy (nr = number of rebuys), and then run it through max(), which returns the maximum of the values passed to it.  Since 1 is one of the values, 1 will be returned if the rest of the formula ends up being 0 or less.

Mesnik44

  • Jr. Member
  • **
  • Posts: 73
    • View Profile
Re: Formula Help Please
« Reply #2 on: July 29, 2015, 05:57:31 PM »
Thanks Corey!