View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Inkel Inkel is offline
external usenet poster
 
Posts: 4
Default Code optimisation

Wow, thanks. It's working.

What's the logic behind "If billet = True Then Exit Function" ?
All i understand when i read that is to end the function "autobus". Or
does it mean to end the other function "vehicule" ?

Thank you very much for your help.

Inkel

"Jacob Skaria" a écrit dans le
message de news: ...
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