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 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
| 'Calcul de l'épargne brute du scénario 1
'
'Épargne brute : [(Somme Recettes Réelles Fct) - (Somme Dépenses Réelles Fct)] pour l'année considérée
' -> Somme RRF : Somme des recettes réelles de fonctionnement du budget général pour l'année (Feuille Recettes FCT)
' -> Somme DRF : Sommes des dépenses réelles de fonctionnement du budget général pour l'année (Feuille Dépenses FCT)
'
Dim annee_sc1
annee_sc1 = Range("B13,C13,D13,E13")
'
'
Dim Somme_RRF_sc1 'Déclaration variable RRF générale
Dim Somme_RRF_sc1_2011 'Déclaration variable RRF 2011
Somme_RRF_sc1_2011 = Range("B16")
Dim Somme_RRF_sc1_2012 'Déclaration variable RRF 2012
Somme_RRF_sc1_2012 = Range("C16")
Dim Somme_RRF_sc1_2013 'Déclaration variable RRF 2013
Somme_RRF_sc1_2013 = Range("D16")
Dim Somme_RRF_sc1_2014 'Déclaration variable RRF 2014
Somme_RRF_sc1_2014 = Range("E16")
If annee_sc1 = "2011" Then
Somme_RRF_sc1 = Somme_RRF_sc1_2011
End If
If annee_sc1 = "2012" Then
Somme_RRF_sc1 = Somme_RRF_sc1_2012
End If
If annee_sc1 = "2013" Then
Somme_RRF_sc1 = Somme_RRF_sc1_2013
End If
If annee_sc1 = "2014" Then
Somme_RRF_sc1 = Somme_RRF_sc1_2014
End If
'Calcul de RRF
Somme_RRF_sc1.FormulaR1C1 = _
"=SUMPRODUCT(('Recettes FCT sc1'!R2C1:R4226C1=""Général"")*('Recettes FCT sc1'!R2C10:R4226C10=annee_sc1)*('Recettes FCT sc1'!R2C3:R4226C3=""Recettes réelles"")*('Recettes FCT sc1'!R2C15:R4226C15))"
Dim Somme_DRF_sc1 'Déclaration variable DRF générale
Dim Somme_DRF_sc1_2011 'Déclaration variable DRF 2011
Somme_DRF_sc1_2011 = Range("B17")
Dim Somme_DRF_sc1_2012 'Déclaration variable DRF 2012
Somme_DRF_sc1_2012 = Range("C17")
Dim Somme_DRF_sc1_2013 'Déclaration variable DRF 2013
Somme_DRF_sc1_2013 = Range("D17")
Dim Somme_DRF_sc1_2014 'Déclaration variable DRF 2014
Somme_DRF_sc1_2014 = Range("E17")
If annee_sc1 = "2011" Then
Somme_DRF_sc1 = Somme_DRF_sc1_2011
End If
If annee_sc1 = "2012" Then
Somme_DRF_sc1 = Somme_DRF_sc1_2012
End If
If annee_sc1 = "2013" Then
Somme_DRF_sc1 = Somme_DRF_sc1_2013
End If
If annee_sc1 = "2014" Then
Somme_DRF_sc1 = Somme_DRF_sc1_2014
End If
'Calcul de DRF
Somme_DRF_sc1.FormulaR1C1 = _
"=SUMPRODUCT(('Dépenses FCT sc1'!R3C1:R4237C1=""Général"")*('Dépenses FCT sc1'!R3C3:R4237C3=""Dépenses réelles"")*('Dépenses FCT sc1'!R3C9:R4237C9=annee_sc1)*('Dépenses FCT sc1'!R3C8:R4237C8))"
Dim Epargne_brute_sc1
Dim Epargne_brute_sc1_2011 'Déclaration variable épargne brute 2011
Epargne_brute_sc1_2011 = Range("B15")
Dim Epargne_brute_sc1_2012 'Déclaration variable épargne brute 2012
Epargne_brute_sc1_2012 = Range("C15")
Dim Epargne_brute_sc1_2013 'Déclaration variable épargne brute 2013
Epargne_brute_sc1_2013 = Range("D15")
Dim Epargne_brute_sc1_2014 'Déclaration variable épargne brute 2014
Epargne_brute_sc1_2014 = Range("E15")
If annee_sc1 = "2011" Then
Epargne_brute_sc1 = Epargne_brute_sc1_2011
End If
If annee_sc1 = "2012" Then
Epargne_brute_sc1 = Epargne_brute_sc1_2012
End If
If annee_sc1 = "2013" Then
Epargne_brute_sc1 = Epargne_brute_sc1_2013
End If
If annee_sc1 = "2014" Then
Epargne_brute_sc1 = Epargne_brute_sc1_2014
End If
'
'Calcul de l'épargne brute
'
Epargne_brute_sc1 = Range("B15")
Epargne_brute_sc1.FormulaR1C1 = Somme_RRF_sc1 - Somme_DRF_sc1 |
Partager