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 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996
|
Public Sub CommandButton1_Click()
Application.ScreenUpdating = False
Sheets("base_cac").Visible = True
Sheets("CAC_PARAM").Visible = True
'validation du rapport par équipe
If Sheets("Rapport CAC").ComboBox1.Text <> "Tous le CAC" Then
Dim resp As String
resp = Sheets("Rapport CAC").ComboBox1.Text
End If
'efface les données présentes
Range("a10:y60000").Select
Selection.Clear
'rapatrie le nom des conseiller
Dim Connexion
Dim conseiller As String
Dim Appels_Pris
Dim Appels_Sortants
Dim Mails
Dim Tps_Recept
Dim Tps_Emission
Dim Tps_Mail
Dim Tps_Moyen_Appels
Dim Tps_Moyen_ACW
Dim Tps_Double_Ecoute
Dim Tps_Accueil
Dim Tps_Dossier
Dim Tps_Formation
Dim Pause_Dej
Dim Pause
Dim Tps_Prod
Dim Rona
Dim Obj_Jour As Long
Dim Appel_heure
Dim Pourcentage_Obj
Dim refbase As Range
Dim refrap As Range
Set Base = ThisWorkbook.Sheets("BASE_CAC")
Set rapport = ThisWorkbook.Sheets("rapport cac")
'met le nombre d'appels par heure
'Sheets("BASE_CAC").Range("x1").Select
'ActiveCell = "Contacts / Heure"
Base.Range("x1").Value = "Contacts / Heure"
'base.Range("x2").Select
Dim Contacts
Dim Tps_Contacts
i = 2
Do While Base.Cells(i, 1) <> ""
'Contacts = APPELS_ENTRANTS + APPELS_SORTANT + Nbre Mail traités
Contacts = Base.Cells(i, 4) + Base.Cells(i, 5) + Base.Cells(i, 22)
'Tps_Contacts = TEMPS_TOTAL_CONNEXION - TEMPS_AUTRE_DEJEUNER - TEMPS_BKO_GESTION_EMAIL
Tps_Contacts = Base.Cells(i, 10) - Base.Cells(i, 20) - Base.Cells(i, 18)
' La même chose que la ligne dessus ! ! !
Tps_Contacts = Base.Cells(i, 10) - Base.Cells(i, 20) - Base.Cells(i, 18)
If Tps_Contacts > 1 / 24 * 6.5 Then
Tps_Contacts = 1 / 24 * 6.5
End If
If Contacts <> 0 Then
If Tps_Contacts <> 0 Then
Base.Cells(i, 24) = Format(((1 / 24 * Contacts) / Tps_Contacts), "0.000")
End If
Else
Base.Cells(i, 24) = ""
End If
i = i + 1
Loop
Base.Range("y1").Value = "% Obj"
i = 2
Do While Base.Cells(i, 1) <> ""
' % Obj = Contacts_Heure / (OBJ / 6.5)
Base.Cells(i, 25) = Base.Cells(i, 24) / (Base.Cells(i, 23) / 6.5)
i = i + 1
Loop
rapport.Select
rapport.Range("b10").Select
Base.Select
Base.Range("a2").Activate
i = 0
j = 0
Set refbase = Base.Range("a2")
Set refrap = rapport.Range("b10")
Do While refbase.Offset(i, 0) <> ""
If rapport.ComboBox1.Text = "Tous le CAC" Or refbase.Offset(i, 0) = resp Then
resp = refbase.Offset(i, 0)
'nom du conseiller
conseiller = refbase.Offset(i, 1).Text
'temps total de connexion
Connexion = refbase.Offset(i, 9).Value
'nombre d'appels pris
Appels_Pris = refbase.Offset(i, 3).Text
'nombre d'appels Sortants
Appels_Sortants = refbase.Offset(i, 4).Text
'Nombre de mails
Mails = refbase.Offset(i, 21).Text
'temps total en réception
Tps_Recept = refbase.Offset(i, 10).Value + refbase.Offset(i, 13).Value
'temps total emission
Tps_Emission = refbase.Offset(i, 11).Value
'Gestion Mails
Tps_Mail = refbase.Offset(i, 16).Value
'nombre d'appels heure
Appel_heure = refbase.Offset(i, 23).Value
'Objectif du collaborateur
Obj_Jour = refbase.Offset(i, 22).Value
'pourcentage objectif
Pourcentage_Obj = refbase.Offset(i, 24).Value
'temps moyen appels
Tps_Moyen_Appels = refbase.Offset(i, 6).Text
'temps moyen ACW
Tps_Moyen_ACW = refbase.Offset(i, 8).Text
'ROna
Rona = refbase.Offset(i, 5).Text
'double écoute
Tps_Double_Ecoute = refbase.Offset(i, 13).Value
'accueil Client
Tps_Accueil = refbase.Offset(i, 14).Value
'Gestion dossier
Tps_Dossier = refbase.Offset(i, 15).Value
'Formation
Tps_Formation = refbase.Offset(i, 17).Value + refbase.Offset(i, 20).Value
'Pause_Dej
Pause_Dej = refbase.Offset(i, 19).Value
'Pause
Pause = refbase.Offset(i, 18).Value
'temps total productif
Tps_Prod = refbase.Offset(i, 10).Value + refbase.Offset(i, 13).Value + refbase.Offset(i, 11).Value + refbase.Offset(i, 16).Value
'Colle sur le rapport les données
rapport.Select
'resp
Sheets("CAC_PARAM").Select
With Sheets("CAC_PARAM").Range("a9:a60000")
Set z = .Find(resp, LookIn:=xlValues)
'Sheets("CAC_PARAM").Range(z.Address).Offset(0, 6).Select
Nom_Resp = Sheets("CAC_PARAM").Range(z.Address).Offset(0, 6)
End With
rapport.Select
'ActiveCell.Offset(0, -1) = Nom_Resp
refrap.Offset(j, -1) = Nom_Resp
'nom du conseiller
refrap.Offset(j, 0) = conseiller
'temps total de connexion
refrap.Offset(j, 1) = Connexion
refrap.Offset(j, 1).NumberFormat = "[h]:mm"
If Connexion > 0 Then
If (Pause + Pause_Dej + Tps_Formation + Tps_Dossier + Tps_Accueil + Tps_Mail + Tps_Emission + Tps_Recept) / Connexion < 0.9 Then
refrap.Offset(j, 1).Font.ColorIndex = 3 'rouge
refrap.Offset(j, 1).Font.Bold = True
Else
refrap.Offset(j, 1).Font.ColorIndex = 50 'vert
refrap.Offset(j, 1).Font.Bold = False
End If
End If
'nombre d'appels pris
refrap.Offset(j, 2) = Appels_Pris
'nombre d'appels Sortants
refrap.Offset(j, 3) = Appels_Sortants
'nombre d'appels de mails
refrap.Offset(j, 4) = Mails
'nombre total d'appels
refrap.Offset(j, 5) = refrap.Offset(j, 2) + refrap.Offset(j, 3) + refrap.Offset(j, 4)
'temps total en réception
refrap.Offset(j, 6) = Tps_Recept
refrap.Offset(j, 6).NumberFormat = "[h]:mm"
'temps total emission
refrap.Offset(j, 7) = Tps_Emission
refrap.Offset(j, 7).NumberFormat = "[h]:mm"
'temps total mails
refrap.Offset(j, 8) = Tps_Mail
refrap.Offset(j, 8).NumberFormat = "[h]:mm"
'nombre d'appels pris par heure
refrap.Offset(j, 9) = Appel_heure
refrap.Offset(j, 9).NumberFormat = "0.0"
'Objectifs
refrap.Offset(j, 10) = Obj_Jour
'% Objectif (calculé sur la base de 6h30 par jour)
'objectif heure
refrap.Offset(j, 11) = Pourcentage_Obj
refrap.Offset(j, 11).NumberFormat = "0.0%"
'point vert orange rouge
If refrap.Offset(j, 11) <> "" Then
refrap.Offset(j, 12).Font.Name = "Wingdings"
refrap.Offset(j, 12) = "l"
Else
refrap.Offset(j, 12) = ""
End If
If refrap.Offset(j, 11) >= 1 Then
refrap.Offset(j, 12).Font.ColorIndex = 50 'vert
End If
If refrap.Offset(j, 11) > 0.9 And refrap.Offset(j, 11) < 1 Then
refrap.Offset(j, 12).Font.ColorIndex = 46 'orange
End If
If refrap.Offset(j, 11) <= 0.9 Then
refrap.Offset(j, 12).Font.ColorIndex = 3 'rouge
End If
'temps moyen appels
refrap.Offset(j, 13) = Tps_Moyen_Appels
refrap.Offset(j, 13).NumberFormat = "[m]:ss"
'tempsmoyen ACW
refrap.Offset(j, 14) = Tps_Moyen_ACW
refrap.Offset(j, 14).NumberFormat = "[m]:ss"
'RONA
refrap.Offset(j, 15) = Rona
'double ecoute
refrap.Offset(j, 17) = Tps_Double_Ecoute
refrap.Offset(j, 17).NumberFormat = "[h]:mm"
'tps accueil client
refrap.Offset(j, 18) = Tps_Accueil
refrap.Offset(j, 18).NumberFormat = "[h]:mm"
'gestion dossiers
refrap.Offset(j, 19) = Tps_Dossier
refrap.Offset(j, 19).NumberFormat = "[h]:mm"
'Formation
If Tps_Formation <> 0 Then
refrap.Offset(j, 20) = Tps_Formation
refrap.Offset(j, 20).NumberFormat = "[h]:mm"
End If
'pause déj
refrap.Offset(j, 21) = Pause_Dej
refrap.Offset(j, 21).NumberFormat = "[h]:mm"
'pause
refrap.Offset(j, 22) = Pause
refrap.Offset(j, 22).NumberFormat = "[h]:mm"
'tps productif
refrap.Offset(j, 23) = Tps_Prod
refrap.Offset(j, 23).NumberFormat = "[h]:mm"
ActiveCell.Offset(1, 0).Activate
Base.Select
j = j + 1
End If
'ActiveCell.Offset(1, 0).Activate
i = i + 1
Loop
'totaux
Dim Signet As String
rapport.Select
'rapport.Range("a10").Select
'met le total s'il y a plus d'une ligne
If Range("a11") <> "" Then
refrap.Offset(0, -1).End(xlDown).Offset(1, 1).Activate
ActiveCell = "Totaux"
Signet = ActiveCell.Address
'total connexion
Dim Totaux
Totaux = 0
Range("c10").Select
Do While ActiveCell.Offset(0, -1) <> "Totaux"
Totaux = Totaux + ActiveCell.Value
ActiveCell.Offset(1, 0).Activate
Loop
ActiveCell = Totaux
ActiveCell.NumberFormat = "[h]:mm"
'total Appels pris
Totaux = 0
Range("d10").Select
Do While ActiveCell.Offset(0, -2) <> "Totaux"
Totaux = Totaux + ActiveCell.Value
ActiveCell.Offset(1, 0).Activate
Loop
ActiveCell = Totaux
'total Appels emis
Totaux = 0
Range("e10").Select
Do While ActiveCell.Offset(0, -3) <> "Totaux"
Totaux = Totaux + ActiveCell.Value
ActiveCell.Offset(1, 0).Activate
Loop
ActiveCell = Totaux
'total mails
Totaux = 0
Range("f10").Select
Do While ActiveCell.Offset(0, -4) <> "Totaux"
Totaux = Totaux + ActiveCell.Value
ActiveCell.Offset(1, 0).Activate
Loop
ActiveCell = Totaux
'total des appels
ActiveCell.Offset(0, 1) = ActiveCell.Value + ActiveCell.Offset(0, -1).Value + ActiveCell.Offset(0, -2).Value
'total temps reception appels
Totaux = 0
Range("h10").Select
Do While ActiveCell.Offset(0, -6) <> "Totaux"
Totaux = Totaux + ActiveCell.Value
ActiveCell.Offset(1, 0).Activate
Loop
ActiveCell = Totaux
ActiveCell.NumberFormat = "[h]:mm"
'total temps émission appels
Totaux = 0
Range("i10").Select
Do While ActiveCell.Offset(0, -7) <> "Totaux"
Totaux = Totaux + ActiveCell.Value
ActiveCell.Offset(1, 0).Activate
Loop
ActiveCell = Totaux
ActiveCell.NumberFormat = "[h]:mm"
'total temps mails
Totaux = 0
Range("j10").Select
Do While ActiveCell.Offset(0, -8) <> "Totaux"
Totaux = Totaux + ActiveCell.Value
ActiveCell.Offset(1, 0).Activate
Loop
ActiveCell = Totaux
ActiveCell.NumberFormat = "[h]:mm"
'appels heures
ActiveCell.Offset(0, 1).Select
ActiveCell = Format((1 / 24 * ActiveCell.Offset(0, -4)) / (ActiveCell.Offset(0, -3) + ActiveCell.Offset(0, -2) + ActiveCell.Offset(0, -1)), "0.0")
'objectif moyen
Totaux = 0
Range("l10").Select
Do While ActiveCell.Offset(0, -10) <> "Totaux"
'total = total + (objectif * temps de connection en tél entrant)
Totaux = Totaux + (ActiveCell.Value * (ActiveCell.Offset(0, -2).Value + ActiveCell.Offset(0, -3).Value + ActiveCell.Offset(0, -4).Value))
ActiveCell.Offset(1, 0).Activate
Loop
ActiveCell = Totaux / (ActiveCell.Offset(0, -2).Value + ActiveCell.Offset(0, -3).Value + ActiveCell.Offset(0, -4).Value)
ActiveCell.NumberFormat = "00.0"
'atteninte objectif du service
Totaux = 0
Range("m10").Select
Do While ActiveCell.Offset(0, -11) <> "Totaux"
Totaux = Totaux + (ActiveCell.Value * (ActiveCell.Offset(0, -3).Value + ActiveCell.Offset(0, -4).Value + ActiveCell.Offset(0, -5).Value))
ActiveCell.Offset(1, 0).Activate
Loop
ActiveCell = Totaux / (ActiveCell.Offset(0, -3).Value + ActiveCell.Offset(0, -4).Value + ActiveCell.Offset(0, -5).Value)
ActiveCell.NumberFormat = "0.0%"
'point vert orange rouge
ActiveCell.Offset(0, 1).Activate
ActiveCell.Font.Name = "Wingdings"
ActiveCell = "l"
If ActiveCell.Offset(0, -1) >= 1 Then
ActiveCell.Font.ColorIndex = 50 'vert
End If
If ActiveCell.Offset(0, -1) > 0.9 And ActiveCell.Offset(0, -1) < 1 Then
ActiveCell.Font.ColorIndex = 46 'orange
End If
If ActiveCell.Offset(0, -1) <= 0.9 Then
ActiveCell.Font.ColorIndex = 3 'rouge
End If
'temps moyen de com
Totaux = 0
Range("o10").Select
Do While ActiveCell.Offset(0, -13) <> "Totaux"
'multiplie le temps moyen par le nombre d'appels => par conseiller
Totaux = Totaux + (ActiveCell * ActiveCell.Offset(0, -11).Value)
ActiveCell.Offset(1, 0).Activate
Loop
ActiveCell = Totaux / ActiveCell.Offset(0, -11).Value
ActiveCell.NumberFormat = "[m]:ss"
'temps moyen ACW
Totaux = 0
Range("p10").Select
Do While ActiveCell.Offset(0, -14) <> "Totaux"
'multiplie le temps moyen par le nombre d'appels => par conseiller
Totaux = Totaux + (ActiveCell * ActiveCell.Offset(0, -12).Value)
ActiveCell.Offset(1, 0).Activate
Loop
ActiveCell = Totaux / ActiveCell.Offset(0, -12).Value
ActiveCell.NumberFormat = "[m]:ss"
'Rona
Totaux = 0
Range("q10").Select
Do While ActiveCell.Offset(0, -15) <> "Totaux"
Totaux = Totaux + ActiveCell.Value
ActiveCell.Offset(1, 0).Activate
Loop
ActiveCell = Totaux
'double ecoute
Totaux = 0
Range("s10").Select
Do While ActiveCell.Offset(0, -17) <> "Totaux"
Totaux = Totaux + ActiveCell.Value
ActiveCell.Offset(1, 0).Activate
Loop
ActiveCell = Totaux
ActiveCell.NumberFormat = "[h]:mm"
'Accueil Clients
Totaux = 0
Range("t10").Select
Do While ActiveCell.Offset(0, -18) <> "Totaux"
Totaux = Totaux + ActiveCell.Value
ActiveCell.Offset(1, 0).Activate
Loop
ActiveCell = Totaux
ActiveCell.NumberFormat = "[h]:mm"
'Gestion Dossiers
Totaux = 0
Range("u10").Select
Do While ActiveCell.Offset(0, -19) <> "Totaux"
Totaux = Totaux + ActiveCell.Value
ActiveCell.Offset(1, 0).Activate
Loop
ActiveCell = Totaux
ActiveCell.NumberFormat = "[h]:mm"
'Formation Réunion
Totaux = 0
Range("v10").Select
Do While ActiveCell.Offset(0, -20) <> "Totaux"
Totaux = Totaux + ActiveCell.Value
ActiveCell.Offset(1, 0).Activate
Loop
ActiveCell = Totaux
ActiveCell.NumberFormat = "[h]:mm"
'pause déjeuner
Totaux = 0
Range("w10").Select
Do While ActiveCell.Offset(0, -21) <> "Totaux"
Totaux = Totaux + ActiveCell.Value
ActiveCell.Offset(1, 0).Activate
Loop
ActiveCell = Totaux
ActiveCell.NumberFormat = "[h]:mm"
'pause
Totaux = 0
Range("x10").Select
Do While ActiveCell.Offset(0, -22) <> "Totaux"
Totaux = Totaux + ActiveCell.Value
ActiveCell.Offset(1, 0).Activate
Loop
ActiveCell = Totaux
ActiveCell.NumberFormat = "[h]:mm"
'temps productif
Totaux = 0
Range("y10").Select
Do While ActiveCell.Offset(0, -23) <> "Totaux"
Totaux = Totaux + ActiveCell.Value
ActiveCell.Offset(1, 0).Activate
Loop
ActiveCell = Totaux
ActiveCell.NumberFormat = "[h]:mm"
End If
'mise en forme
'met en gras les totaux
On Error GoTo fin
ActiveCell.Offset(0, -23).Range("b1:y1").Select
Selection.Font.Bold = True
rapport.Select
Range("a10:y10").Select
If Range("a11") <> "" Then
Range(Selection, Selection.End(xlDown)).Select
End If
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 41
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 41
End With
If Range("a11") <> "" Then
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 41
End With
End If
'Tableau de répartition des temps
Range(Signet).Select
ActiveCell.Offset(2, -1) = "2 - Répartition des temps de traitement"
ActiveCell.Offset(2, -1).Font.Size = 12
ActiveCell.Offset(2, -1).Font.Bold = True
ActiveCell.Offset(2, -1).Font.ColorIndex = 41
ActiveCell.Offset(4, 0) = "Temps Total de connexion"
ActiveCell.Offset(4, 2) = ActiveCell.Offset(0, 1).Value
ActiveCell.Offset(4, 2).NumberFormat = "[h]:mm"
ActiveCell.Offset(6, 0) = "Temps Total en Réception"
ActiveCell.Offset(6, 2) = ActiveCell.Offset(0, 6).Value
ActiveCell.Offset(6, 2).NumberFormat = "[h]:mm"
ActiveCell.Offset(6, 3) = Format(ActiveCell.Offset(6, 2).Value / ActiveCell.Offset(4, 2).Value, "00.0%")
ActiveCell.Offset(7, 0) = " Dont en Double Ecoute"
ActiveCell.Offset(7, 2) = ActiveCell.Offset(0, 17).Value
ActiveCell.Offset(7, 2).NumberFormat = "[h]:mm"
ActiveCell.Offset(7, 3) = Format(ActiveCell.Offset(7, 2).Value / ActiveCell.Offset(6, 2).Value, "00.0%")
ActiveCell.Offset(7, 0).Font.Italic = True
ActiveCell.Offset(7, 2).Font.Italic = True
ActiveCell.Offset(7, 3).Font.Italic = True
ActiveCell.Offset(8, 0) = "Temps Total en Emission"
ActiveCell.Offset(8, 2) = ActiveCell.Offset(0, 7).Value
ActiveCell.Offset(8, 2).NumberFormat = "[h]:mm"
ActiveCell.Offset(8, 3) = Format(ActiveCell.Offset(8, 2).Value / ActiveCell.Offset(4, 2).Value, "00.0%")
ActiveCell.Offset(9, 0) = "Temps Total en Accueil Clients"
ActiveCell.Offset(9, 2) = ActiveCell.Offset(0, 18).Value
ActiveCell.Offset(9, 2).NumberFormat = "[h]:mm"
ActiveCell.Offset(9, 3) = Format(ActiveCell.Offset(9, 2).Value / ActiveCell.Offset(4, 2).Value, "00.0%")
ActiveCell.Offset(10, 0) = "Temps Total en Gestiond de Dossiers"
ActiveCell.Offset(10, 2) = ActiveCell.Offset(0, 19).Value
ActiveCell.Offset(10, 2).NumberFormat = "[h]:mm"
ActiveCell.Offset(10, 3) = Format(ActiveCell.Offset(10, 2).Value / ActiveCell.Offset(4, 2).Value, "00.0%")
ActiveCell.Offset(11, 0) = "Temps Total en Gestiond de Mails"
ActiveCell.Offset(11, 2) = ActiveCell.Offset(0, 8).Value
ActiveCell.Offset(11, 2).NumberFormat = "[h]:mm"
ActiveCell.Offset(11, 3) = Format(ActiveCell.Offset(11, 2).Value / ActiveCell.Offset(4, 2).Value, "00.0%")
ActiveCell.Offset(12, 0) = "Temps Total en Formation / Réunion"
ActiveCell.Offset(12, 2) = ActiveCell.Offset(0, 20).Value
ActiveCell.Offset(12, 2).NumberFormat = "[h]:mm"
ActiveCell.Offset(12, 3) = Format(ActiveCell.Offset(12, 2).Value / ActiveCell.Offset(4, 2).Value, "00.0%")
ActiveCell.Offset(13, 0) = "Temps Total en Pause déjeuner"
ActiveCell.Offset(13, 2) = ActiveCell.Offset(0, 21).Value
ActiveCell.Offset(13, 2).NumberFormat = "[h]:mm"
ActiveCell.Offset(13, 3) = Format(ActiveCell.Offset(13, 2).Value / ActiveCell.Offset(4, 2).Value, "00.0%")
ActiveCell.Offset(14, 0) = "Temps Total en Pause"
ActiveCell.Offset(14, 2) = ActiveCell.Offset(0, 22).Value
ActiveCell.Offset(14, 2).NumberFormat = "[h]:mm"
ActiveCell.Offset(14, 3) = Format(ActiveCell.Offset(14, 2).Value / ActiveCell.Offset(4, 2).Value, "00.0%")
Range(Signet).Select
ActiveCell.Offset(2, -1).Activate
ActiveCell.Offset(0, 0).Range("a1:e14").Select
Selection.Borders(xlEdgeLeft).Weight = xlThin
Selection.Borders(xlEdgeLeft).ColorIndex = 41
Selection.Borders(xlEdgeTop).Weight = xlThin
Selection.Borders(xlEdgeTop).ColorIndex = 41
Selection.Borders(xlEdgeBottom).Weight = xlThin
Selection.Borders(xlEdgeBottom).ColorIndex = 41
Selection.Borders(xlEdgeRight).Weight = xlThin
Selection.Borders(xlEdgeRight).ColorIndex = 41
'Tableau de répartition des conseillers
Range(Signet).Select
ActiveCell.Offset(17, -1) = "3 - Atteinte Objectif : Pourcentage des conseillers"
ActiveCell.Offset(17, -1).Font.Size = 12
ActiveCell.Offset(17, -1).Font.Bold = True
ActiveCell.Offset(17, -1).Font.ColorIndex = 41
'compteurs
Dim Nbre_COnseillers As Long
Dim Nbre_Obj_Bon As Long
Dim Nbre_Obj_Moyen As Long
Dim Nbre_Obj_Nul As Long
Nbre_Obj_Bon = 0
Nbre_Obj_Moyen = 0
Nbre_Obj_Nul = 0
Range("m10").Select
Do While ActiveCell.Offset(0, -11) <> "Totaux"
If ActiveCell <> "" Then
If ActiveCell >= 1 Then
Nbre_Obj_Bon = Nbre_Obj_Bon + 1
End If
If ActiveCell > 0.9 And ActiveCell < 1 Then
Nbre_Obj_Moyen = Nbre_Obj_Moyen + 1
End If
If ActiveCell <= 0.9 Then
Nbre_Obj_Nul = Nbre_Obj_Nul + 1
End If
End If
ActiveCell.Offset(1, 0).Activate
Loop
Range(Signet).Select
ActiveCell.Offset(19, 0) = "Nbre total de conseillers"
ActiveCell.Offset(19, 2) = Nbre_Obj_Bon + Nbre_Obj_Moyen + Nbre_Obj_Nul
ActiveCell.Offset(21, 0) = "Obj >= 100%"
ActiveCell.Offset(21, 2) = Nbre_Obj_Bon
ActiveCell.Offset(21, 3) = Format(Nbre_Obj_Bon / ActiveCell.Offset(19, 2).Value, "0%")
ActiveCell.Offset(22, 0) = "Obj entre 90% & 100% "
ActiveCell.Offset(22, 2) = Nbre_Obj_Moyen
ActiveCell.Offset(22, 3) = Format(Nbre_Obj_Moyen / ActiveCell.Offset(19, 2).Value, "0%")
ActiveCell.Offset(23, 0) = "Obj <= 90%"
ActiveCell.Offset(23, 2) = Nbre_Obj_Nul
ActiveCell.Offset(23, 3) = Format(Nbre_Obj_Nul / ActiveCell.Offset(19, 2).Value, "0%")
Range(Signet).Select
ActiveCell.Offset(17, -1).Activate
ActiveCell.Offset(0, 0).Range("a1:e8").Select
Selection.Borders(xlEdgeLeft).Weight = xlThin
Selection.Borders(xlEdgeLeft).ColorIndex = 41
Selection.Borders(xlEdgeTop).Weight = xlThin
Selection.Borders(xlEdgeTop).ColorIndex = 41
Selection.Borders(xlEdgeBottom).Weight = xlThin
Selection.Borders(xlEdgeBottom).ColorIndex = 41
Selection.Borders(xlEdgeRight).Weight = xlThin
Selection.Borders(xlEdgeRight).ColorIndex = 41
'conparatif entre resp
Range(Signet).Select
ActiveCell.Offset(2, 5) = "4 - Comparatif entre équipes."
ActiveCell.Offset(2, 5).Font.Size = 12
ActiveCell.Offset(2, 5).Font.Bold = True
ActiveCell.Offset(2, 5).Font.ColorIndex = 41
'copie la liste des responsable
Sheets("CAC_Param").Select
Sheets("CAC_Param").Range("a9").Select
Sheets("CAC_Param").Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
rapport.Select
ActiveCell.Offset(5, 5).Select
Selection.PasteSpecial Paste:=xlValues
'nombre de conseillers
ActiveCell.Offset(-2, 4).Select
ActiveCell = "Nbre Conseillers"
ActiveCell.Offset(0, 0).Range("a1:a2").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = True
.MergeCells = True
End With
ActiveCell.Offset(1, -4).Activate
Do While ActiveCell <> ""
resp = ActiveCell
i = 0
Base.Select
Base.Range("a2").Select
Do While ActiveCell <> ""
If ActiveCell = resp Then
i = i + 1
End If
ActiveCell.Offset(1, 0).Activate
Loop
rapport.Select
ActiveCell.Offset(0, 4) = i
ActiveCell.Offset(0, 4).HorizontalAlignment = xlCenter
ActiveCell.Offset(1, 0).Activate
Loop
'Pourcentage Moyen objectif
Range(Signet).Select
ActiveCell.Offset(3, 10).Select
ActiveCell = "Réalisation de l'objectif"
ActiveCell.Offset(0, 0).Range("a1:b2").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = True
.MergeCells = True
End With
ActiveCell.Offset(1, -5).Activate
Do While ActiveCell <> ""
resp = ActiveCell
i = 0
j = 0
Base.Select
Base.Range("a2").Select
Do While ActiveCell <> ""
If ActiveCell = resp Then
'i=i+object du conseiller * (temps en réception appels + tps en double écoute+temps en emission + tps en mail)
i = i + ActiveCell.Offset(0, 24).Value * (ActiveCell.Offset(0, 10).Value + ActiveCell.Offset(0, 13).Value + ActiveCell.Offset(0, 11).Value + ActiveCell.Offset(0, 16).Value)
'j = temps total de récetion d'appels
j = j + (ActiveCell.Offset(0, 10).Value + ActiveCell.Offset(0, 13).Value + ActiveCell.Offset(0, 11).Value + ActiveCell.Offset(0, 16).Value)
End If
ActiveCell.Offset(1, 0).Activate
Loop
rapport.Select
If j <> 0 And i <> 0 Then
ActiveCell.Offset(0, 6) = i / j
ActiveCell.Offset(0, 6).HorizontalAlignment = xlCenter
ActiveCell.Offset(0, 6).NumberFormat = "0%"
ActiveCell.Offset(0, 5).Activate
ActiveCell.Font.Name = "Wingdings"
ActiveCell = "l"
If ActiveCell.Offset(0, 1) >= 1 Then
ActiveCell.Font.ColorIndex = 50 'vert
End If
If ActiveCell.Offset(0, 1) > 0.9 And ActiveCell.Offset(0, 1) < 1 Then
ActiveCell.Font.ColorIndex = 46 'orange
End If
If ActiveCell.Offset(0, 1) <= 0.9 Then
ActiveCell.Font.ColorIndex = 3 'rouge
End If
ActiveCell.HorizontalAlignment = xlRight
ActiveCell.Offset(0, -5).Activate
End If
ActiveCell.Offset(1, 0).Activate
Loop
'Appels entrants et sortants + total
Range(Signet).Select
ActiveCell.Offset(3, 13).Select
ActiveCell = "Appels Entrants"
ActiveCell.Offset(0, 0).Range("a1:a2").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = True
.MergeCells = True
End With
ActiveCell.Offset(0, 1) = "Appels Sortants"
ActiveCell.Offset(0, 1).Range("a1:a2").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = True
.MergeCells = True
End With
ActiveCell.Offset(0, 1) = "Mails"
ActiveCell.Offset(0, 1).Range("a1:a2").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = True
.MergeCells = True
End With
ActiveCell.Offset(0, 2) = "Total Contacts"
ActiveCell.Offset(0, 2).Range("a1:a2").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = True
.MergeCells = True
End With
ActiveCell.Offset(1, -12).Activate
Do While ActiveCell <> ""
resp = ActiveCell
i = 0
j = 0
K = 0
Base.Select
Base.Range("a2").Select
Do While ActiveCell <> ""
If ActiveCell = resp Then
i = i + ActiveCell.Offset(0, 3).Value 'appels entrants
j = j + ActiveCell.Offset(0, 4).Value ' appels sortants
K = K + ActiveCell.Offset(0, 21).Value ' mails
End If
ActiveCell.Offset(1, 0).Activate
Loop
rapport.Select
ActiveCell.Offset(0, 8) = i
ActiveCell.Offset(0, 9) = j
ActiveCell.Offset(0, 10) = K
ActiveCell.Offset(0, 12) = i + j + K
ActiveCell.Offset(0, 8).HorizontalAlignment = xlCenter
ActiveCell.Offset(0, 9).HorizontalAlignment = xlCenter
ActiveCell.Offset(0, 10).HorizontalAlignment = xlCenter
ActiveCell.Offset(0, 12).HorizontalAlignment = xlCenter
ActiveCell.Offset(1, 0).Activate
Loop
'Temps Moyen appels temps moyen ACW
Range(Signet).Select
ActiveCell.Offset(3, 18).Select
ActiveCell = "Tps Moy Appels"
ActiveCell.Offset(0, 0).Range("a1:a2").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = True
.MergeCells = True
End With
ActiveCell.Offset(0, 1) = "Tps Moy ACW"
ActiveCell.Offset(0, 1).Range("a1:a2").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = True
.MergeCells = True
End With
ActiveCell.Offset(1, -14).Activate
Do While ActiveCell <> ""
resp = ActiveCell
i = 0
j = 0
Base.Select
Base.Range("a2").Select
Do While ActiveCell <> ""
If ActiveCell = resp Then
i = i + (ActiveCell.Offset(0, 3).Value * ActiveCell.Offset(0, 6).Value) 'appels entrants * tps moyen
j = j + (ActiveCell.Offset(0, 3).Value * ActiveCell.Offset(0, 8).Value) ' appels entrants * tps moyen ACW
End If
ActiveCell.Offset(1, 0).Activate
Loop
rapport.Select
If i <> 0 And j <> 0 Then
ActiveCell.Offset(0, 13) = i / ActiveCell.Offset(0, 8)
ActiveCell.Offset(0, 14) = j / ActiveCell.Offset(0, 8)
ActiveCell.Offset(0, 13).HorizontalAlignment = xlCenter
ActiveCell.Offset(0, 13).NumberFormat = "mm:ss"
ActiveCell.Offset(0, 14).HorizontalAlignment = xlCenter
ActiveCell.Offset(0, 14).NumberFormat = "mm:ss"
End If
ActiveCell.Offset(1, 0).Activate
Loop
'% temps double écoute
Range(Signet).Select
ActiveCell.Offset(2, 20).Select
ActiveCell = "% tps double écoute*"
ActiveCell.Offset(0, 0).Range("a1:a3").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = True
.MergeCells = True
End With
ActiveCell.Offset(1, -15).Activate
Do While ActiveCell <> ""
resp = ActiveCell
i = 0
j = 0
Base.Select
Base.Range("a2").Select
Do While ActiveCell <> ""
If ActiveCell = resp Then
'i = temsp tel entrant + temps tel double écoute
'j = temps tel double écoute
i = i + (ActiveCell.Offset(0, 10).Value + ActiveCell.Offset(0, 13).Value)
j = j + ActiveCell.Offset(0, 13).Value
End If
ActiveCell.Offset(1, 0).Activate
Loop
rapport.Select
If i <> 0 And j <> 0 Then
ActiveCell.Offset(0, 15) = j / i
ActiveCell.Offset(0, 15).HorizontalAlignment = xlCenter
ActiveCell.Offset(0, 15).NumberFormat = "0.0%"
End If
ActiveCell.Offset(1, 0).Activate
Loop
'ligne
Range(Signet).Offset(5, 5).Activate
ActiveCell.Offset(0, 0).Range("a1:p1").Select
Range(Selection, Selection.End(xlDown).Offset(-1, 0)).Select
Selection.Borders(xlEdgeTop).LineStyle = xlContinuous
Selection.Borders(xlEdgeTop).ColorIndex = 41
Selection.Borders(xlEdgeBottom).LineStyle = xlContinuous
Selection.Borders(xlEdgeBottom).ColorIndex = 41
Selection.Borders(xlInsideHorizontal).LineStyle = xlContinuous
Selection.Borders(xlInsideHorizontal).ColorIndex = 41
'cadre
Dim Celldeb As String
Dim Cellfin As String
Celldeb = Range(Signet).Offset(2, 5).Address
Cellfin = ActiveCell.End(xlDown).Offset(1, 15).Address
Range(Celldeb & ":" & Cellfin).Select
Selection.Borders(xlEdgeLeft).Weight = xlThin
Selection.Borders(xlEdgeLeft).ColorIndex = 41
Selection.Borders(xlEdgeTop).Weight = xlThin
Selection.Borders(xlEdgeTop).ColorIndex = 41
Selection.Borders(xlEdgeBottom).Weight = xlThin
Selection.Borders(xlEdgeBottom).ColorIndex = 41
Selection.Borders(xlEdgeRight).Weight = xlThin
Selection.Borders(xlEdgeRight).ColorIndex = 41
'zone d'impression
Dim Cellbas As String
Cellbas = Range(Signet).Offset(25, 23).Address
ActiveSheet.PageSetup.PrintArea = "$A$7:" & Cellbas
fin:
'base.Visible = False
'Sheets("CAC_PARAM").Visible = False
ActiveWindow.SmallScroll Down:=-9
Range("A10:Y10").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Sort Key1:=Range("A10"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
'goto de fin si une seule ligne est remontée lors de l'niterrogation
Application.ScreenUpdating = True
End Sub
Private Sub Worksheet_Activate()
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
End Sub
Public Sub MAJGraphique()
'
' MAJGraphique Macro
' Macro enregistrée le 29/10/2009 par gilson
'
Application.ScreenUpdating = False
i = 1
v_lignedepart = 8
v_membretraité = 2
v_nbmembres = Range("S12").Value
v_nbmembres_max = 12
For i = 1 To v_nbmembres_max
'
v_lignedepart = v_lignedepart + 1
v_membretraité = v_membretraité + 1
If v_membretraité > v_nbmembres + 1 Then
Range("U" & v_lignedepart & ":AE" & v_lignedepart).Select
Selection.ClearContents
Else
Application.CutCopyMode = False
Range("U8:AE8").Select
Selection.Copy
Range("U" & v_lignedepart).Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
End If
Next i
Application.ScreenUpdating = True
Range("a1").Activate
End Sub |