1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
| sub copie()
Range("O6:DU6").AutoFill Destination:=Range("O6:DU" & Range("A" & Rows.Count).End(xlUp).Row), Type:=xlFillDefault
End Sub
Function maFonction(CelPourcent As Range, Cel1 As Range, Cel2 As Range)
Dim p As Single
Select Case CelPourcent
Case 0.1315: p = 0.1976
Case 0.135: p = 0.2143
Case 0.137: p = 0.2238
Case 0.1376: p = 0.2267
Case 0.1391: p = 0.2338
Case 0.1453: p = 0.2633
Case 0.1454: p = 0.2638
Case 0.135: p = 0.2143
Case 0.137: p = 0.2238
Case 0.1376: p = 0.2267
Case 0.1391: p = 0.2338
Case 0.1453: p = 0.2633
Case 0.1454: p = 0.2638
Case 0.1458: p = 0.2657
Case 0.147: p = 0.2714
Case 0.1474: p = 0.2733
Case 0.1479: p = 0.2757
Case 0.15: p = 0.2857
Case 0.1505: p = 0.2881
Case 0.155: p = 0.3095
Case 0.1567: p = 0.3176
Case 0.1597: p = 0.3319
Case 0.164: p = 0.3524
Case 0.165: p = 0.3571
Case 0.169: p = 0.3762
Case 0.1716: p = 0.3886
Case 0.1894: p = 0.4733
Case 0.193: p = 0.4905
Case 0.197: p = 0.5095
Case 0.201: p = 0.5286
Case 0.2025: p = 0.5357
Case 0.21: p = 0.5714
Case 0.216: p = 0.6
Case 0.238: p = 0.7048
Case 0.2494: p = 0.759
Case 0.257: p = 0.7952
Case 0.262: p = 0.819
Case 0.2685: p = 0.85
Case 0.27: p = 0.8571
Case 0.2775: p = 0.8929
Case 0.2832: p = 0.92
End Select
maFonction = (Cel1 + Cel2) * p
End Function
End Sub
Function Fonction(CelPourcent As Range, Cel1 As Range, Cel2 As Range, cel3 As Range)
Select Case CelPourcent.Value
Case 0.0716: Fonction = (Cel1 + Cel2) * 0.08
Case 0.074: Fonction = (Cel1 + Cel2) * 0.2
Case 0.077: Fonction = (Cel1 + Cel2) * 0.35
Case 0.08: Fonction = (Cel1 + Cel2) * 0.5
Case 0.085: Fonction = (Cel1 + Cel2) * 0.75
Case 0.0852: Fonction = (Cel1 + Cel2) * 0.76
Case 0.044, 0.045, 0.09, 0.0906, 0.0912, 0.095, 0.102, 0.1527: Fonction = Cel1 + Cel2
End Select
If Cel1 = 0 Or Cel2 = 0 Then
Fonction = 0
Else
Fonction = Cel1 + Cel2 - cel3
End If
End Function |
Partager