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 95 96 97 98 99 100 101 102 103
| 'Contrôle de l'équilibre des montants contenus dans les deux exports
With Sheets("Export Sage")
Debit = .Cells.Find("Débit", LookIn:=xlValues).Column
Credit = .Cells.Find("Crédit", LookIn:=xlValues).Column
Sage1 = .Cells.Find("17cz Idemnisation mutuelle T2C", LookIn:=xlValues).Row
Sage2 = .Cells.Find("17tz ij mutuelle 2e maladie", LookIn:=xlValues).Row
Sage3 = .Cells.Find("17bz Ijss maladie 100%", LookIn:=xlValues).Row
Sage4 = .Cells.Find("17rz ijss 2eme mal 100%", LookIn:=xlValues).Row
Sage5 = .Cells.Find("17iz Ijss accident travail<=28", LookIn:=xlValues).Row
Sage6 = .Cells.Find("17jz Ijss accident travail>28j", LookIn:=xlValues).Row
Sage7_1 = .Cells.Find("17kz Ijss accident trajet<=28j", LookIn:=xlValues).Row
Sage7_2 = .Cells.Find("17lz Ijss accident trajet>28j", LookIn:=xlValues).Row
Sage8 = .Cells.Find("173z Ijss maternité", LookIn:=xlValues).Row
Sage9 = .Cells.Find("176z Ijss Paternité", LookIn:=xlValues).Row
Sage10 = .Cells.Find("17oz Ijss MTH maladie 50%", LookIn:=xlValues).Row
Sage11 = .Cells.Find("17pz Ijss MTH accident travail", LookIn:=xlValues).Row
ValCatSage1 = .Cells(Sage1, Debit).Value - .Cells(Sage1, Credit).Value
ValCatSage2 = .Cells(Sage2, Debit).Value - .Cells(Sage2, Credit).Value
ValCatSage3 = .Cells(Sage3, Debit).Value - .Cells(Sage3, Credit).Value
ValCatSage4 = .Cells(Sage4, Debit).Value - .Cells(Sage4, Credit).Value
ValCatSage5 = .Cells(Sage5, Debit).Value - .Cells(Sage5, Credit).Value
ValCatSage6 = .Cells(Sage6, Debit).Value - .Cells(Sage6, Credit).Value
ValCatSage7 = .Cells(Sage7_1, Debit).Value - .Cells(Sage7_1, Credit).Value + .Cells(Sage7_2, Debit).Value - .Cells(Sage7_2, Credit).Value
ValCatSage8 = .Cells(Sage8, Debit).Value - .Cells(Sage8, Credit).Value
ValCatSage9 = .Cells(Sage9, Debit).Value - .Cells(Sage9, Credit).Value
ValCatSage10 = .Cells(Sage10, Debit).Value - .Cells(Sage10, Credit).Value
ValCatSage11 = .Cells(Sage11, Debit).Value - .Cells(Sage11, Credit).Value
End With
With Sheets("Export Pandore")
LR2 = .Cells(.Rows.Count, 1).End(xlUp).Row
ValPandore1 = .Cells(LR2, 4).Value + .Cells(LR2, 15).Value
ValPandore2 = .Cells(LR2, 5).Value + .Cells(LR2, 16).Value
ValPandore3 = .Cells(LR2, 6).Value + .Cells(LR2, 17).Value
ValPandore4 = .Cells(LR2, 7).Value + .Cells(LR2, 18).Value
ValPandore5 = .Cells(LR2, 8).Value + .Cells(LR2, 19).Value
ValPandore6 = .Cells(LR2, 9).Value + .Cells(LR2, 20).Value
ValPandore7 = .Cells(LR2, 10).Value + .Cells(LR2, 21).Value
ValPandore8 = .Cells(LR2, 11).Value + .Cells(LR2, 22).Value
ValPandore9 = .Cells(LR2, 12).Value + .Cells(LR2, 23).Value
ValPandore10 = .Cells(LR2, 13).Value + .Cells(LR2, 24).Value
ValPandore11 = .Cells(LR2, 14).Value + .Cells(LR2, 25).Value
Disc = 0
If ValCatSage1 - ValPandore1 <> 0 Then
MsgBox "L'écart entre Sage et Pandore sur la catégorie '17cz Idemnisation mutuelle T2C' est de " & Format(ValCatSage1 - ValPandore1, "#,##0.00") & " .", vbCritical, "Contrôle de l'équilibre des rapports"
Disc = Disc + 1
End If
If ValCatSage2 - ValPandore2 <> 0 Then
MsgBox "L'écart entre Sage et Pandore sur la catégorie '17tz ij mutuelle 2e maladie' est de " & Format(ValCatSage2 - ValPandore2, "#,##0.00") & " .", vbCritical, "Contrôle de l'équilibre des rapports"
Disc = Disc + 1
End If
If ValCatSage3 - ValPandore3 <> 0 Then
MsgBox "L'écart entre Sage et Pandore sur la catégorie '17bz Ijss maladie 100%' est de " & Format(ValCatSage3 - ValPandore3, "#,##0.00") & " .", vbCritical, "Contrôle de l'équilibre des rapports"
Disc = Disc + 1
End If
If ValCatSage4 - ValPandore4 <> 0 Then
MsgBox "L'écart entre Sage et Pandore sur la catégorie '17rz ijss 2eme mal 100%' est de " & Format(ValCatSage4 - ValPandore4, "#,##0.00") & " .", vbCritical, "Contrôle de l'équilibre des rapports"
Disc = Disc + 1
End If
If ValCatSage5 - ValPandore5 <> 0 Then
MsgBox "L'écart entre Sage et Pandore sur la catégorie '17iz Ijss accident travail<=28' est de " & Format(ValCatSage5 - ValPandore5, "#,##0.00") & " .", vbCritical, "Contrôle de l'équilibre des rapports"
Disc = Disc + 1
End If
If ValCatSage6 - ValPandore6 <> 0 Then
MsgBox "L'écart entre Sage et Pandore sur la catégorie '17jz Ijss accident travail>28j' est de " & Format(ValCatSage6 - ValPandore6, "#,##0.00") & " .", vbCritical, "Contrôle de l'équilibre des rapports"
Disc = Disc + 1
End If
If ValCatSage7 - ValPandore7 <> 0 Then
MsgBox "L'écart entre Sage et Pandore sur la (les) catégorie(s) '17kz Ijss accident trajet<=28j / 17lz Ijss accident trajet>28j' est de " & Format(ValCatSage7 - ValPandore7, "#,##0.00") & " .", vbCritical, "Contrôle de l'équilibre des rapports"
Disc = Disc + 1
End If
If ValCatSage8 - ValPandore8 <> 0 Then
MsgBox "L'écart entre Sage et Pandore sur la catégorie '173z Ijss maternité' est de " & Format(ValCatSage8 - ValPandore8, "#,##0.00") & " .", vbCritical, "Contrôle de l'équilibre des rapports"
Disc = Disc + 1
End If
If ValCatSage9 - ValPandore9 <> 0 Then
MsgBox "L'écart entre Sage et Pandore sur la catégorie '176z Ijss Paternité' est de " & Format(ValCatSage9 - ValPandore9, "#,##0.00") & " .", vbCritical, "Contrôle de l'équilibre des rapports"
Disc = Disc + 1
End If
If ValCatSage10 - ValPandore10 <> 0 Then
MsgBox "L'écart entre Sage et Pandore sur la catégorie '17oz Ijss MTH maladie 50%' est de " & Format(ValCatSage10 - ValPandore10, "#,##0.00") & " .", vbCritical, "Contrôle de l'équilibre des rapports"
Disc = Disc + 1
End If
If ValCatSage11 - ValPandore11 <> 0 Then
MsgBox "L'écart entre Sage et Pandore sur la catégorie '17pz Ijss MTH accident travail' est de " & Format(ValCatSage11 - ValPandore11, "#,##0.00") & " .", vbCritical, "Contrôle de l'équilibre des rapports"
Disc = Disc + 1
End If
If Disc <> 0 Then
MsgBox "" & Disc & "", vbCritical, "Test"
Exit Sub
End If
End With |
Partager