I am creating a little sports day program in excel.
I am trying to calculate the points based on event and postion.
I have this at the moment for the points function:
VB Code:
Function points() Sheets("Sheet1").Select position1 = Range("B6").Value event1 = Range("B7").Value ' if event not relay and position is 1st make points = 4 ' if event not relay and position is 2nd make points = 3 ' if event not relay and position is 3rd make points = 2 ' if event not relay and position is 4th make points = 1 ' if event is relay and position is 1st make points = 8 ' if event is relay and position is 2nd make points = 6 ' if event is relay and position is 3rd make points = 4 ' if event is relay and position is 4th make points = 2 End Function
How can I do these comparsions:
if event not relay and position is 1st make points = 4
if event not relay and position is 2nd make points = 3
if event not relay and position is 3rd make points = 2
if event not relay and position is 4th make points = 1
if event is relay and position is 1st make points = 8
if event is relay and position is 2nd make points = 6
if event is relay and position is 3rd make points = 4
if event is relay and position is 4th make points = 2
Thank you




Reply With Quote