The first one is what you asked for, but I'd use the second version since it's less finicky about the input
Both are in the attachment
Option Explicit
Function Commission(NumAttendants As Long, Steps As String) As Double
Dim v As Variant
Dim i As Long
v = Split(Steps, ";")
For i = UBound(v) - 1 To LBound(v) Step -2
If NumAttendants >= v(i) Then
Commission = v(i + 1)
Exit Function
End If
Next i
End Function
Function Commission1(NumAttendants As Long, ParamArray Steps()) As Double
Dim i As Long
For i = UBound(Steps) - 1 To LBound(Steps) Step -2
If NumAttendants >= Steps(i) Then
Commission1 = Steps(i + 1)
Exit Function
End If
Next i
End Function