Function FThrough(Chiffre_Affaires_1 As Range, Chiffre_Affaires_2 As Range, RBE1 As Range, RBE2 As Range) As Double
Dim dCA As Double
Dim dRBE As Double
'---
dCA = Chiffre_Affaires_2 - Chiffre_Affaires_1
dRBE = RBE2 - RBE1
Select Case dCA
Case Is > 0
FThrough = dRBE / dCA
Case Is > dRBE
FThrough = (dRBE - dCA / -dCA) - 1
Case Is < 0
FThrough = (dCA - dRBE) / dCA
Case Else
FThrough = (dRBE - dCA) / -dCA
End Select
End Function
Sub DescriptionFThrough(Optional dummy As Byte)
Application.MacroOptions Macro:="FThrough", Category:=14, _
Description:="la fonction FThrough :" _
& vbCrLf & "elle fait ceci" _
& vbCrLf & "et aussi cela" _
& vbCrLf & "et encore ..." _
& vbCrLf & "Bon courage."
End Sub