Code optimisation
Dear Inkel
Functino modified. If billet = True then the function exists or else it will
pick up the right one..... Try and feedback..
Function autobus(billet, region)
region = Sheets("Frais dépl").Range("k8")
If billet = True Then Exit Function
For intTemp = 21 To 29
If region = Sheets("Frais").Range("B" & intTemp) Then
autobus = Sheets("Frais").Range("E" & intTemp)
Exit For
End If
Next
End Function
If this post helps click Yes
---------------
Jacob Skaria
|