I already have created the below VB functions in Excel which work fine, but now I'm trying to create a case statement which can call these functions from a third cell. i.e I'd like to enter "All, H Better" or "All L Better" and the correct function to be signed/called automatically. Any suggestions. Thanks.
Function AllHbetter(currentscore As Double, Goal As Double)
If currentscore >= Goal Then
AllHbetter = 4
End If
If currentscore < Goal Then
AllHbetter = 1
End If
If currentscore = nul Then
AllHbetter = 0
End If
End Function
Function AllLbetter(currentscore As Double, Goal As Double)
If currentscore <= Goal Then
AllLbetter = 4
End If
If currentscore > Goal Then
AllLbetter = 1
End If
If currentscore = nul Then
AllLbetter = 0
End If
End Function
Function AllHbetter(currentscore As Double, Goal As Double)
If currentscore >= Goal Then
AllHbetter = 4
End If
If currentscore < Goal Then
AllHbetter = 1
End If
If currentscore = nul Then
AllHbetter = 0
End If
End Function
Function AllLbetter(currentscore As Double, Goal As Double)
If currentscore <= Goal Then
AllLbetter = 4
End If
If currentscore > Goal Then
AllLbetter = 1
End If
If currentscore = nul Then
AllLbetter = 0
End If
End Function