Hi all,
I'm currently writing some fairly lengthy functions for a project to make things more efficient, but a lot of what i need to do can get quite repetitive.
I would love to be able to create a function that had more than a single output.
For example: (simplified)
Currently i have two values being created WHR and WHRRating. Is it possible to create a single function that can output the values WHR and WHRRating as having to create two seperate functions (1 for each) gets a little repetitive and seems innefficient to me?
I'm currently writing some fairly lengthy functions for a project to make things more efficient, but a lot of what i need to do can get quite repetitive.
I would love to be able to create a function that had more than a single output.
For example: (simplified)
Code:
WHR = CDec(Nz(waist)) / CDec(Nz(hip))
If Gender = "Male" Then
If WHR < 0.9 Then
WHRRating = "Ideal"
Else
If WHR >= 0.9 And WHR < 1 Then
WHRRating = "Moderate Risk"
Else
WHRRating = "High Risk"
End If
End If
Else
If WHR < 0.8 Then
WHRRating = "Ideal"
Else
If WHR >= 0.8 And WHR < 0.9 Then
WHRRating = "Moderate Risk"
Else
WHRRating = "High Risk"
End If
End If
End If
Currently i have two values being created WHR and WHRRating. Is it possible to create a single function that can output the values WHR and WHRRating as having to create two seperate functions (1 for each) gets a little repetitive and seems innefficient to me?