Author Topic: Formula for rounding points to the nearest whole number  (Read 1765 times)

ccarpol

  • Newbie
  • *
  • Posts: 6
    • View Profile
Formula for rounding points to the nearest whole number
« on: October 11, 2006, 02:41:45 PM »
Ive created this formula for point scoring, but I don't know how to make it round every number to the nearest whole number.  Any suggestions?

if(r==1,  n+nr, if(r==2, .80*(n+nr), if(r==3, .70*(n+nr), if(r==4,
.60*(n+nr), if(r==5, .50*(n+nr), if(r==6, .40*(n+nr), if(r==7,
.30*(n+nr),
if(r==8, .20*(n+nr), if(r>8, .05*(n+nr))))))))))


Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Formula for rounding points to the nearest whole number
« Reply #1 on: October 11, 2006, 04:09:46 PM »
round(if(r==1, n+nr, if(r==2, .80*(n+nr), if(r==3, .70*(n+nr), if(r==4, .60*(n+nr), if(r==5, .50*(n+nr), if(r==6, .40*(n+nr), if(r==7, .30*(n+nr), if(r==8, .20*(n+nr), if(r>8, .05*(n+nr)))))))))))