I would like to have a User Defined Function that has three cell reference arguments and depending on a value of first cell, the value of the first or second cell is returned and the non-returning value is placed in the third cell reference. I have this that gives me an error. Cell formula: =GameSet(D6;D8;K5) Function GameSet(Player1 As String, Player2 As String, Loser As String) As String Dim Temp As String If Player2 = "Bye" Then Temp = Player1 Loser = Player2 End If GameSet = Temp End Function