T
Tom
I am using the function below...
At this time I need to exactly specify each "case" in
order to pick up all matching records.
However, I would like to use a wildcard (either at the
beginning or end or both) in order to reduce the number of
case statements.
For instance, instead of having the statements...
Case "BM1": ConvertRank = "First Class"
Case "SK1": ConvertRank = "First Class"
Case "YN1": ConvertRank = "First Class"
I'd rather use...
Case "*1": ConvertRank = "First Class"
Any suggestions are greatly appreciated!!!
Thanks,
Tom
*********************************************
Public Function ConvertRank(BILLET As Variant, RANK As
Variant) As Variant
If BILLET = "SupportStaff" Then
Select Case RANK
Case "BM1": ConvertRank = "First Class"
Case "SK1": ConvertRank = "First Class"
Case "YN1": ConvertRank = "First Class"
Case Else: ConvertRank = "UNKNOWN"
End Select
End If
End Function
At this time I need to exactly specify each "case" in
order to pick up all matching records.
However, I would like to use a wildcard (either at the
beginning or end or both) in order to reduce the number of
case statements.
For instance, instead of having the statements...
Case "BM1": ConvertRank = "First Class"
Case "SK1": ConvertRank = "First Class"
Case "YN1": ConvertRank = "First Class"
I'd rather use...
Case "*1": ConvertRank = "First Class"
Any suggestions are greatly appreciated!!!
Thanks,
Tom
*********************************************
Public Function ConvertRank(BILLET As Variant, RANK As
Variant) As Variant
If BILLET = "SupportStaff" Then
Select Case RANK
Case "BM1": ConvertRank = "First Class"
Case "SK1": ConvertRank = "First Class"
Case "YN1": ConvertRank = "First Class"
Case Else: ConvertRank = "UNKNOWN"
End Select
End If
End Function