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:
  1. Function points()
  2. Sheets("Sheet1").Select
  3. position1 = Range("B6").Value
  4. event1 = Range("B7").Value
  5.  
  6. ' if event not relay and position is 1st make points = 4
  7. ' if event not relay and position is 2nd make points = 3
  8. ' if event not relay and position is 3rd make points = 2
  9. ' if event not relay and position is 4th make points = 1
  10.  
  11. ' if event is relay and position is 1st make points = 8
  12. ' if event is relay and position is 2nd make points = 6
  13. ' if event is relay and position is 3rd make points = 4
  14. ' if event is relay and position is 4th make points = 2
  15.  
  16.  
  17. 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