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
| Private Sub Worksheet_Change(ByVal Target As Range)
Dim i As Integer
Dim WS As String 'variable de controle
i = 1
While i < 32760
WS = Worksheets("BDR").Cells(i, 2).Text
If Worksheets("BDR").Cells(i, 4).Text = "Assurance Apartement" Then
Worksheets("BDR").Cells(i, 2).Interior.ColorIndex = 43
ElseIf Worksheets("BDR").Cells(i, 4).Text = "Assurance Familliale" Then
Worksheets("BDR").Cells(i, 2).Interior.ColorIndex = 6754
ElseIf Worksheets("BDR").Cells(i, 4).Text = "Assurance incendie" Then
Worksheets("BDR").Cells(i, 2).Interior.ColorIndex = 5345
ElseIf Worksheets("BDR").Cells(i, 4).Text = "Assurance Vie" Then
Worksheets("BDR").Cells(i, 2).Interior.ColorIndex = 89
ElseIf Worksheets("BDR").Cells(i, 4).Text = "Assurance Voiture" Then
Worksheets("BDR").Cells(i, 2).Interior.ColorIndex = 65
ElseIf Worksheets("BDR").Cells(i, 4) = "Cigarettes" Then
Worksheets("BDR").Cells(i, 2).Interior.ColorIndex = 70
ElseIf Worksheets("BDR").Cells(i, 4) = "Coiffeuse (ced)" Then
Worksheets("BDR").Cells(i, 2).Interior.ColorIndex = 75
ElseIf Worksheets("BDR").Cells(i, 4) = "Coiffeuse (Rosa)" Then
Worksheets("BDR").Cells(i, 2).Interior.ColorIndex = 80
ElseIf Worksheets("BDR").Cells(i, 4) = "Compte Epargne" Then
Worksheets("BDR").Cells(i, 2).Interior.ColorIndex = 85
ElseIf Worksheets("BDR").Cells(i, 4) = "Confort" Then
Worksheets("BDR").Cells(i, 2).Interior.ColorIndex = 90
ElseIf Worksheets("BDR").Cells(i, 4) = "Course Alimentaire" Then
Worksheets("BDR").Cells(i, 2).Interior.ColorIndex = 95
ElseIf Worksheets("BDR").Cells(i, 4) = "Course Menage" Then
Worksheets("BDR").Cells(i, 2).Interior.ColorIndex = 100
ElseIf Worksheets("BDR").Cells(i, 4) = "Divers" Then
Worksheets("BDR").Cells(i, 2).Interior.ColorIndex = 200
ElseIf Worksheets("BDR").Cells(i, 4) = "Emprunt Maison" Then
Worksheets("BDR").Cells(i, 2).Interior.ColorIndex = 300
ElseIf Worksheets("BDR").Cells(i, 4) = "Emprunt Maman(franca)" Then
Worksheets("BDR").Cells(i, 2).Interior.ColorIndex = 500
ElseIf Worksheets("BDR").Cells(i, 4) = "Emprunt Voiture" Then
Worksheets("BDR").Cells(i, 2).Interior.ColorIndex = 700
ElseIf Worksheets("BDR").Cells(i, 4) = "Essence" Then
Worksheets("BDR").Cells(i, 2).Interior.ColorIndex = 1000
ElseIf Worksheets("BDR").Cells(i, 4) = "Gsm cédric" Then
Worksheets("BDR").Cells(i, 2).Interior.ColorIndex = 5000
ElseIf Worksheets("BDR").Cells(i, 4) = "Gsm Rosa" Then
Worksheets("BDR").Cells(i, 2).Interior.ColorIndex = 10000
ElseIf Worksheets("BDR").Cells(i, 4) = "Loyer Appartement" Then
Worksheets("BDR").Cells(i, 2).Interior.ColorIndex = 20000
ElseIf Worksheets("BDR").Cells(i, 4) = "Luminus" Then
Worksheets("BDR").Cells(i, 2).Interior.ColorIndex = 50000
ElseIf Worksheets("BDR").Cells(i, 4) = "Mazout Chauffage" Then
Worksheets("BDR").Cells(i, 2).Interior.ColorIndex = 100000
ElseIf Worksheets("BDR").Cells(i, 4) = "Medecin" Then
Worksheets("BDR").Cells(i, 2).Interior.ColorIndex = 200000
ElseIf Worksheets("BDR").Cells(i, 4) = "Medicament" Then
Worksheets("BDR").Cells(i, 2).Interior.ColorIndex = 500000
ElseIf Worksheets("BDR").Cells(i, 4) = "Mutuelle cédric" Then
Worksheets("BDR").Cells(i, 2).Interior.ColorIndex = 1000000
ElseIf Worksheets("BDR").Cells(i, 4) = "Mutuelle Rosa" Then
Worksheets("BDR").Cells(i, 2).Interior.ColorIndex = 3000000
ElseIf Worksheets("BDR").Cells(i, 4) = "Ordinateur" Then
Worksheets("BDR").Cells(i, 2).Interior.ColorIndex = 5000000
ElseIf Worksheets("BDR").Cells(i, 4) = "Region Wallone des eaux" Then
Worksheets("BDR").Cells(i, 2).Interior.ColorIndex = 6000000
ElseIf Worksheets("BDR").Cells(i, 4) = "Salaire cédric" Then
Worksheets("BDR").Cells(i, 2).Interior.ColorIndex = 7000000
ElseIf Worksheets("BDR").Cells(i, 4) = "Salaire Rosa" Then
Worksheets("BDR").Cells(i, 2).Interior.ColorIndex = 8000000
ElseIf Worksheets("BDR").Cells(i, 4) = "Sport (cédric)" Then
Worksheets("BDR").Cells(i, 2).Interior.ColorIndex = 9000000
ElseIf Worksheets("BDR").Cells(i, 4) = "Vêtements" Then
Worksheets("BDR").Cells(i, 2).Interior.ColorIndex = 10000000
ElseIf Worksheets("BDR").Cells(i, 4) = "Voiture" Then
Worksheets("BDR").Cells(i, 2).Interior.ColorIndex = 30000000
End If
i = i + 1
Wend
End Sub |
Partager