Private Function mutual_prime(num1 As Integer, num2 As Integer) As Boolean Dim k As Integer, min As Integer If num1 < num2 Then min = num1 Else min = num2 For k = 2 To min / 2 If num1 Mod k = 0 And num2 Mod k = 0 Then Exit Function Next k mutual_prime = True End Function