IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Macros et VBA Excel Discussion :

Extraction plan de charge en un récapitulatif


Sujet :

Macros et VBA Excel

  1. #1
    Futur Membre du Club
    Profil pro
    Inscrit en
    Mai 2012
    Messages
    5
    Détails du profil
    Informations personnelles :
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Mai 2012
    Messages : 5
    Points : 6
    Points
    6
    Par défaut Extraction plan de charge en un récapitulatif
    Bonjour,
    voila je prépare des indicateurs qui sont bien avancés, cependant pour avoir les variables des charges effectuées, j'ai besoin de connaitre le temps passé par tache et par projet.
    Le principe : les users remplissent un tableau (en partage) avec liste définies et le planning de l'année entière.

    J'ai cherché cherché (longtemps) d'appliquer les fonctions de R&Matrices, de BDD, sur les forums pour arriver à faire quelque chose mais mes connaissances ne sont pas assez pointues en VBA.

    Voici mon fichier pour le principe avec 2 users et une semaine par mois (mais y aura bien sur tous les jours de l'année) avec le tableau 2 qui récapitule le Nb de Jours/tache/projet

    Pensez vous que c'est faisable par une fonction ou en vba ?
    Merci
    Fichiers attachés Fichiers attachés

  2. #2
    Membre confirmé Avatar de Bear the french
    Homme Profil pro
    Inscrit en
    Mai 2012
    Messages
    353
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Saône et Loire (Bourgogne)

    Informations forums :
    Inscription : Mai 2012
    Messages : 353
    Points : 633
    Points
    633
    Par défaut
    Bonjour maxashtar,

    Oui cela semble possible à condition d'être bien rigoureux (le décalage d'une cellule et le code devient faux).
    Personnellement je ferai apparaître la synthèse sur une deuxième feuille.

    Toutes tes données pourraient être chargées dans un tableau VBA à plusieurs dimensions. J'ai écrit ci dessous une base, en référence à ton fichier :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    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
    Dim big_tableau(2, 365, 8, 5) As Variant
    Dim nom, tache, projet As String
    Dim mois, jour As Date
    Dim poids As Long
    Dim base, nbperso As Integer
     
     
    nbperso = 1
    For base = 4 To 15 Step 11
        nom = Cells(base, 4).Value
        nbjour = 1
        For j = 5 To 27 Step 2
            jour = Cells(base - 1, j).Value
            For i = base + 1 To base + 8
                If Cells(i, j).Value = "" Then
                    poids = "0"
                    projet = "pas de projet"
                    tache = "pas de tache"
                Else
                    poids = Cells(i, 4).Value
                    projet = Cells(i, j).Value
                    tache = Cells(i, j + 1).Value
                End If
                big_tableau(nbperso - 1, nbjour - 1, i - 1 - base, 0) = nom
                big_tableau(nbperso - 1, nbjour - 1, i - 1 - base, 1) = jour
                big_tableau(nbperso - 1, nbjour - 1, i - 1 - base, 2) = poids
                big_tableau(nbperso - 1, nbjour - 1, i - 1 - base, 3) = projet
                big_tableau(nbperso - 1, nbjour - 1, i - 1 - base, 4) = tache
            Next
            nbjour = nbjour + 1
        Next
    nbperso = nbperso + 1
    Next
    Bertrand

  3. #3
    Futur Membre du Club
    Profil pro
    Inscrit en
    Mai 2012
    Messages
    5
    Détails du profil
    Informations personnelles :
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Mai 2012
    Messages : 5
    Points : 6
    Points
    6
    Par défaut
    Super merci Bertrand
    Oui bien sur le tableau récapitulatif sera sur une autre feuille

    Mais je connais pas bien les tableaux multi dimensions en VBA
    quelle est sa mise en oeuvre ? car j'ai créé une macro avec ton code mais il ne se passe rien, si tu peux m'en dire plus.

    Merci beaucoup
    Max

  4. #4
    Membre confirmé Avatar de Bear the french
    Homme Profil pro
    Inscrit en
    Mai 2012
    Messages
    353
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Saône et Loire (Bourgogne)

    Informations forums :
    Inscription : Mai 2012
    Messages : 353
    Points : 633
    Points
    633
    Par défaut
    Bonjour,

    C'est normal, mon code permet de charger les données dans un tableau VBA... Mais il reste à les exploiter.

    Si tu me laisses un peu de temps, je peux te construire quelques chose. Par contre, il te faudra l'adapter et en faire la maintenance, c'est pourquoi il t'est nécessaire de bien comprendre le mécanisme. Sinon, ça n'a pas d'intérêt

    Bertrand

  5. #5
    Futur Membre du Club
    Profil pro
    Inscrit en
    Mai 2012
    Messages
    5
    Détails du profil
    Informations personnelles :
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Mai 2012
    Messages : 5
    Points : 6
    Points
    6
    Par défaut
    Oui bien sur que je me charge de l'adaptation et la maintenance
    en effet si tu as un modèle avec une explication je suis preneur, et oui c'est pas pressé pressé

    Merci Bertrand

  6. #6
    Membre confirmé Avatar de Bear the french
    Homme Profil pro
    Inscrit en
    Mai 2012
    Messages
    353
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Saône et Loire (Bourgogne)

    Informations forums :
    Inscription : Mai 2012
    Messages : 353
    Points : 633
    Points
    633
    Par défaut
    Bonsoir Max,

    Ci-joint la trame pour faire ton récapitulatif.

    N'hésites pas à modifier les dates et autres données dans ton onglet "Journalier" et de relancer ensuite la macro pour voir le résultat dans l'onglet "Global".

    Il est nécessaire d'optimiser le code car il est écrit sur plus de 300 lignes mais il fonctionne et c'est déjà ça. En plus, une fois optimisé, il risque d'être plus difficile à déchiffrer

    La macro complète :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    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
    Sub sousformedetable()
     
    Dim nom, tache, projet As String
    Dim mois, jour As Date
    Dim poids As Double
    Dim base, nbperso, i1, i2, i3, i, j, x, z As Integer
     
    ' big_tableau (steeve ou jean, 8 lignes possibles par jour, 5 données par lignes : nom de l'employé, jours en question, poids, projet, tache)
    Dim big_tableau(2, 365, 8, 5) As Variant
     
    ' on remplie la variable tableau VBA avec l'onglet "Journalier"
    With Sheets("Journalier")
        nbperso = 1
        ' les données du premier employé commence à la ligne 4
        ' le deuxième employé : ses données commencent 11 lignes plus bas
        For base = 4 To 15 Step 11 ' 15 car 15eme ligne pour le début du deuxième employé
            nom = .Cells(base, 4).Value
            nbjour = 0
            For j = 5 To 27 Step 2 ' 27 car 27ème colonne = on va jusqu'à la colonne AA (à changer si plus de jours)
                jour = .Cells(base - 1, j).Value
                For i = base + 1 To base + 8
                    If .Cells(i, j).Value = "" Then
                        poids = "0"
                        projet = "pas de projet"
                        tache = "pas de tache"
                    Else
                        poids = .Cells(i, 4).Value
                        projet = .Cells(i, j).Value
                        tache = .Cells(i, j + 1).Value
                    End If
                    big_tableau(nbperso - 1, nbjour, i - 1 - base, 0) = nom
                    big_tableau(nbperso - 1, nbjour, i - 1 - base, 1) = jour
                    big_tableau(nbperso - 1, nbjour, i - 1 - base, 2) = poids
                    big_tableau(nbperso - 1, nbjour, i - 1 - base, 3) = projet
                    big_tableau(nbperso - 1, nbjour, i - 1 - base, 4) = tache
                    jourmax = jourmax + 1
                Next
                nbjour = nbjour + 1
            Next
        nbperso = nbperso + 1
        Next
    End With
     
     
    'on vide le tableau global avant de faire les calculs
    For i = 0 To 2
        For j = 0 To 11
            Sheets("Global").Range(Sheets("Global").Cells(9 + i * 4, 7 + j * 4), Sheets("Global").Cells(11 + i * 4, 8 + j * 4)).ClearContents
        Next
    Next
     
    'on "ratisse" le big_tableau en croisant les critères
    z = 7
    For i1 = 0 To 1
        For i2 = 0 To 364
            For i3 = 0 To 7
     
                'projet A tache 1
                x = 9
                If big_tableau(i1, i2, i3, 4) = 1 And big_tableau(i1, i2, i3, 3) = "A" Then
                    Select Case Month(big_tableau(i1, i2, i3, 1))
                        Case 1
                            Sheets("Global").Cells(x, z + i1).Value = Sheets("Global").Cells(x, z + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 2
                            Sheets("Global").Cells(x, z + 4 + i1).Value = Sheets("Global").Cells(x, z + 4 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 3
                            Sheets("Global").Cells(x, z + 8 + i1).Value = Sheets("Global").Cells(x, z + 8 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 4
                            Sheets("Global").Cells(x, z + 12 + i1).Value = Sheets("Global").Cells(x, z + 12 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 5
                            Sheets("Global").Cells(x, z + 16 + i1).Value = Sheets("Global").Cells(x, z + 16 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 6
                            Sheets("Global").Cells(x, z + 20 + i1).Value = Sheets("Global").Cells(x, z + 20 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 7
                            Sheets("Global").Cells(x, z + 24 + i1).Value = Sheets("Global").Cells(x, z + 24 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 8
                            Sheets("Global").Cells(x, z + 28 + i1).Value = Sheets("Global").Cells(x, z + 28 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 9
                            Sheets("Global").Cells(x, z + 32 + i1).Value = Sheets("Global").Cells(x, z + 32 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 10
                            Sheets("Global").Cells(x, z + 36 + i1).Value = Sheets("Global").Cells(x, z + 36 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 11
                            Sheets("Global").Cells(x, z + 40 + i1).Value = Sheets("Global").Cells(x, z + 40 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 12
                            Sheets("Global").Cells(x, z + 44 + i1).Value = Sheets("Global").Cells(x, z + 44 + i1).Value + big_tableau(i1, i2, i3, 2)
                    End Select
                End If
     
                'projet A tache 2
                x = 10
                If big_tableau(i1, i2, i3, 4) = 2 And big_tableau(i1, i2, i3, 3) = "A" Then
                    Select Case Month(big_tableau(i1, i2, i3, 1))
                        Case 1
                            Sheets("Global").Cells(x, z + i1).Value = Sheets("Global").Cells(x, z + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 2
                            Sheets("Global").Cells(x, z + 4 + i1).Value = Sheets("Global").Cells(x, z + 4 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 3
                            Sheets("Global").Cells(x, z + 8 + i1).Value = Sheets("Global").Cells(x, z + 8 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 4
                            Sheets("Global").Cells(x, z + 12 + i1).Value = Sheets("Global").Cells(x, z + 12 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 5
                            Sheets("Global").Cells(x, z + 16 + i1).Value = Sheets("Global").Cells(x, z + 16 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 6
                            Sheets("Global").Cells(x, z + 20 + i1).Value = Sheets("Global").Cells(x, z + 20 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 7
                            Sheets("Global").Cells(x, z + 24 + i1).Value = Sheets("Global").Cells(x, z + 24 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 8
                            Sheets("Global").Cells(x, z + 28 + i1).Value = Sheets("Global").Cells(x, z + 28 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 9
                            Sheets("Global").Cells(x, z + 32 + i1).Value = Sheets("Global").Cells(x, z + 32 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 10
                            Sheets("Global").Cells(x, z + 36 + i1).Value = Sheets("Global").Cells(x, z + 36 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 11
                            Sheets("Global").Cells(x, z + 40 + i1).Value = Sheets("Global").Cells(x, z + 40 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 12
                            Sheets("Global").Cells(x, z + 44 + i1).Value = Sheets("Global").Cells(x, z + 44 + i1).Value + big_tableau(i1, i2, i3, 2)
                    End Select
                End If
     
                'projet A tache 3
                x = 11
                If big_tableau(i1, i2, i3, 4) = 3 And big_tableau(i1, i2, i3, 3) = "A" Then
                    Select Case Month(big_tableau(i1, i2, i3, 1))
                        Case 1
                            Sheets("Global").Cells(x, z + i1).Value = Sheets("Global").Cells(x, z + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 2
                            Sheets("Global").Cells(x, z + 4 + i1).Value = Sheets("Global").Cells(x, z + 4 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 3
                            Sheets("Global").Cells(x, z + 8 + i1).Value = Sheets("Global").Cells(x, z + 8 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 4
                            Sheets("Global").Cells(x, z + 12 + i1).Value = Sheets("Global").Cells(x, z + 12 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 5
                            Sheets("Global").Cells(x, z + 16 + i1).Value = Sheets("Global").Cells(x, z + 16 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 6
                            Sheets("Global").Cells(x, z + 20 + i1).Value = Sheets("Global").Cells(x, z + 20 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 7
                            Sheets("Global").Cells(x, z + 24 + i1).Value = Sheets("Global").Cells(x, z + 24 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 8
                            Sheets("Global").Cells(x, z + 28 + i1).Value = Sheets("Global").Cells(x, z + 28 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 9
                            Sheets("Global").Cells(x, z + 32 + i1).Value = Sheets("Global").Cells(x, z + 32 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 10
                            Sheets("Global").Cells(x, z + 36 + i1).Value = Sheets("Global").Cells(x, z + 36 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 11
                            Sheets("Global").Cells(x, z + 40 + i1).Value = Sheets("Global").Cells(x, z + 40 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 12
                            Sheets("Global").Cells(x, z + 44 + i1).Value = Sheets("Global").Cells(x, z + 44 + i1).Value + big_tableau(i1, i2, i3, 2)
                    End Select
                End If
     
                'projet B tache 1
                x = 13
                If big_tableau(i1, i2, i3, 4) = 1 And big_tableau(i1, i2, i3, 3) = "B" Then
                    Select Case Month(big_tableau(i1, i2, i3, 1))
                        Case 1
                            Sheets("Global").Cells(x, z + i1).Value = Sheets("Global").Cells(x, z + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 2
                            Sheets("Global").Cells(x, z + 4 + i1).Value = Sheets("Global").Cells(x, z + 4 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 3
                            Sheets("Global").Cells(x, z + 8 + i1).Value = Sheets("Global").Cells(x, z + 8 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 4
                            Sheets("Global").Cells(x, z + 12 + i1).Value = Sheets("Global").Cells(x, z + 12 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 5
                            Sheets("Global").Cells(x, z + 16 + i1).Value = Sheets("Global").Cells(x, z + 16 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 6
                            Sheets("Global").Cells(x, z + 20 + i1).Value = Sheets("Global").Cells(x, z + 20 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 7
                            Sheets("Global").Cells(x, z + 24 + i1).Value = Sheets("Global").Cells(x, z + 24 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 8
                            Sheets("Global").Cells(x, z + 28 + i1).Value = Sheets("Global").Cells(x, z + 28 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 9
                            Sheets("Global").Cells(x, z + 32 + i1).Value = Sheets("Global").Cells(x, z + 32 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 10
                            Sheets("Global").Cells(x, z + 36 + i1).Value = Sheets("Global").Cells(x, z + 36 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 11
                            Sheets("Global").Cells(x, z + 40 + i1).Value = Sheets("Global").Cells(x, z + 40 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 12
                            Sheets("Global").Cells(x, z + 44 + i1).Value = Sheets("Global").Cells(x, z + 44 + i1).Value + big_tableau(i1, i2, i3, 2)
                    End Select
                End If
     
                'projet B tache 2
                x = 14
                If big_tableau(i1, i2, i3, 4) = 2 And big_tableau(i1, i2, i3, 3) = "B" Then
                    Select Case Month(big_tableau(i1, i2, i3, 1))
                        Case 1
                            Sheets("Global").Cells(x, z + i1).Value = Sheets("Global").Cells(x, z + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 2
                            Sheets("Global").Cells(x, z + 4 + i1).Value = Sheets("Global").Cells(x, z + 4 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 3
                            Sheets("Global").Cells(x, z + 8 + i1).Value = Sheets("Global").Cells(x, z + 8 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 4
                            Sheets("Global").Cells(x, z + 12 + i1).Value = Sheets("Global").Cells(x, z + 12 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 5
                            Sheets("Global").Cells(x, z + 16 + i1).Value = Sheets("Global").Cells(x, z + 16 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 6
                            Sheets("Global").Cells(x, z + 20 + i1).Value = Sheets("Global").Cells(x, z + 20 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 7
                            Sheets("Global").Cells(x, z + 24 + i1).Value = Sheets("Global").Cells(x, z + 24 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 8
                            Sheets("Global").Cells(x, z + 28 + i1).Value = Sheets("Global").Cells(x, z + 28 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 9
                            Sheets("Global").Cells(x, z + 32 + i1).Value = Sheets("Global").Cells(x, z + 32 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 10
                            Sheets("Global").Cells(x, z + 36 + i1).Value = Sheets("Global").Cells(x, z + 36 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 11
                            Sheets("Global").Cells(x, z + 40 + i1).Value = Sheets("Global").Cells(x, z + 40 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 12
                            Sheets("Global").Cells(x, z + 44 + i1).Value = Sheets("Global").Cells(x, z + 44 + i1).Value + big_tableau(i1, i2, i3, 2)
                    End Select
                End If
     
                'projet B tache 3
                x = 15
                If big_tableau(i1, i2, i3, 4) = 3 And big_tableau(i1, i2, i3, 3) = "B" Then
                    Select Case Month(big_tableau(i1, i2, i3, 1))
                        Case 1
                            Sheets("Global").Cells(x, z + i1).Value = Sheets("Global").Cells(x, z + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 2
                            Sheets("Global").Cells(x, z + 4 + i1).Value = Sheets("Global").Cells(x, z + 4 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 3
                            Sheets("Global").Cells(x, z + 8 + i1).Value = Sheets("Global").Cells(x, z + 8 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 4
                            Sheets("Global").Cells(x, z + 12 + i1).Value = Sheets("Global").Cells(x, z + 12 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 5
                            Sheets("Global").Cells(x, z + 16 + i1).Value = Sheets("Global").Cells(x, z + 16 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 6
                            Sheets("Global").Cells(x, z + 20 + i1).Value = Sheets("Global").Cells(x, z + 20 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 7
                            Sheets("Global").Cells(x, z + 24 + i1).Value = Sheets("Global").Cells(x, z + 24 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 8
                            Sheets("Global").Cells(x, z + 28 + i1).Value = Sheets("Global").Cells(x, z + 28 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 9
                            Sheets("Global").Cells(x, z + 32 + i1).Value = Sheets("Global").Cells(x, z + 32 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 10
                            Sheets("Global").Cells(x, z + 36 + i1).Value = Sheets("Global").Cells(x, z + 36 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 11
                            Sheets("Global").Cells(x, z + 40 + i1).Value = Sheets("Global").Cells(x, z + 40 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 12
                            Sheets("Global").Cells(x, z + 44 + i1).Value = Sheets("Global").Cells(x, z + 44 + i1).Value + big_tableau(i1, i2, i3, 2)
                    End Select
                End If
     
                'projet C tache 1
                x = 17
                If big_tableau(i1, i2, i3, 4) = 1 And big_tableau(i1, i2, i3, 3) = "C" Then
                    Select Case Month(big_tableau(i1, i2, i3, 1))
                        Case 1
                            Sheets("Global").Cells(x, z + i1).Value = Sheets("Global").Cells(x, z + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 2
                            Sheets("Global").Cells(x, z + 4 + i1).Value = Sheets("Global").Cells(x, z + 4 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 3
                            Sheets("Global").Cells(x, z + 8 + i1).Value = Sheets("Global").Cells(x, z + 8 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 4
                            Sheets("Global").Cells(x, z + 12 + i1).Value = Sheets("Global").Cells(x, z + 12 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 5
                            Sheets("Global").Cells(x, z + 16 + i1).Value = Sheets("Global").Cells(x, z + 16 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 6
                            Sheets("Global").Cells(x, z + 20 + i1).Value = Sheets("Global").Cells(x, z + 20 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 7
                            Sheets("Global").Cells(x, z + 24 + i1).Value = Sheets("Global").Cells(x, z + 24 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 8
                            Sheets("Global").Cells(x, z + 28 + i1).Value = Sheets("Global").Cells(x, z + 28 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 9
                            Sheets("Global").Cells(x, z + 32 + i1).Value = Sheets("Global").Cells(x, z + 32 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 10
                            Sheets("Global").Cells(x, z + 36 + i1).Value = Sheets("Global").Cells(x, z + 36 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 11
                            Sheets("Global").Cells(x, z + 40 + i1).Value = Sheets("Global").Cells(x, z + 40 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 12
                            Sheets("Global").Cells(x, z + 44 + i1).Value = Sheets("Global").Cells(x, z + 44 + i1).Value + big_tableau(i1, i2, i3, 2)
                    End Select
                End If
     
                'projet C tache 2
                x = 18
                If big_tableau(i1, i2, i3, 4) = 2 And big_tableau(i1, i2, i3, 3) = "C" Then
                    Select Case Month(big_tableau(i1, i2, i3, 1))
                        Case 1
                            Sheets("Global").Cells(x, z + i1).Value = Sheets("Global").Cells(x, z + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 2
                            Sheets("Global").Cells(x, z + 4 + i1).Value = Sheets("Global").Cells(x, z + 4 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 3
                            Sheets("Global").Cells(x, z + 8 + i1).Value = Sheets("Global").Cells(x, z + 8 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 4
                            Sheets("Global").Cells(x, z + 12 + i1).Value = Sheets("Global").Cells(x, z + 12 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 5
                            Sheets("Global").Cells(x, z + 16 + i1).Value = Sheets("Global").Cells(x, z + 16 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 6
                            Sheets("Global").Cells(x, z + 20 + i1).Value = Sheets("Global").Cells(x, z + 20 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 7
                            Sheets("Global").Cells(x, z + 24 + i1).Value = Sheets("Global").Cells(x, z + 24 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 8
                            Sheets("Global").Cells(x, z + 28 + i1).Value = Sheets("Global").Cells(x, z + 28 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 9
                            Sheets("Global").Cells(x, z + 32 + i1).Value = Sheets("Global").Cells(x, z + 32 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 10
                            Sheets("Global").Cells(x, z + 36 + i1).Value = Sheets("Global").Cells(x, z + 36 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 11
                            Sheets("Global").Cells(x, z + 40 + i1).Value = Sheets("Global").Cells(x, z + 40 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 12
                            Sheets("Global").Cells(x, z + 44 + i1).Value = Sheets("Global").Cells(x, z + 44 + i1).Value + big_tableau(i1, i2, i3, 2)
                    End Select
                End If
     
                'projet C tache 3
                x = 19
                If big_tableau(i1, i2, i3, 4) = 3 And big_tableau(i1, i2, i3, 3) = "C" Then
                    Select Case Month(big_tableau(i1, i2, i3, 1))
                        Case 1
                            Sheets("Global").Cells(x, z + i1).Value = Sheets("Global").Cells(x, z + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 2
                            Sheets("Global").Cells(x, z + 4 + i1).Value = Sheets("Global").Cells(x, z + 4 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 3
                            Sheets("Global").Cells(x, z + 8 + i1).Value = Sheets("Global").Cells(x, z + 8 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 4
                            Sheets("Global").Cells(x, z + 12 + i1).Value = Sheets("Global").Cells(x, z + 12 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 5
                            Sheets("Global").Cells(x, z + 16 + i1).Value = Sheets("Global").Cells(x, z + 16 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 6
                            Sheets("Global").Cells(x, z + 20 + i1).Value = Sheets("Global").Cells(x, z + 20 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 7
                            Sheets("Global").Cells(x, z + 24 + i1).Value = Sheets("Global").Cells(x, z + 24 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 8
                            Sheets("Global").Cells(x, z + 28 + i1).Value = Sheets("Global").Cells(x, z + 28 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 9
                            Sheets("Global").Cells(x, z + 32 + i1).Value = Sheets("Global").Cells(x, z + 32 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 10
                            Sheets("Global").Cells(x, z + 36 + i1).Value = Sheets("Global").Cells(x, z + 36 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 11
                            Sheets("Global").Cells(x, z + 40 + i1).Value = Sheets("Global").Cells(x, z + 40 + i1).Value + big_tableau(i1, i2, i3, 2)
                        Case 12
                            Sheets("Global").Cells(x, z + 44 + i1).Value = Sheets("Global").Cells(x, z + 44 + i1).Value + big_tableau(i1, i2, i3, 2)
                    End Select
                End If
     
            Next
        Next
    Next
     
    End Sub
    Bertrand
    Fichiers attachés Fichiers attachés

  7. #7
    Membre confirmé Avatar de Bear the french
    Homme Profil pro
    Inscrit en
    Mai 2012
    Messages
    353
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Saône et Loire (Bourgogne)

    Informations forums :
    Inscription : Mai 2012
    Messages : 353
    Points : 633
    Points
    633
    Par défaut
    Bonjour,

    Un premier lifting sur mon code pour réduire le nombre de ligne à 144 lignes :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    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
    Sub sousformedetable()
     
    Dim nom, tache, projet As String
    Dim mois, jour As Date
    Dim poids As Double
    Dim base, nbperso, i1, i2, i3, i, j, x, z As Integer
     
    ' big_tableau (steeve ou jean, 8 lignes possibles par jour, 5 données par lignes : nom de l'employé, jours en question, poids, projet, tache)
    Dim big_tableau(2, 365, 8, 5) As Variant
     
    ' on remplie la variable tableau VBA avec l'onglet "Journalier"
    With Sheets("Journalier")
        nbperso = 1
        ' les données du premier employé commence à la ligne 4
        ' le deuxième employé : ses données commencent 11 lignes plus bas
        For base = 4 To 15 Step 11 ' 15 car 15eme ligne pour le début du deuxième employé
            nom = .Cells(base, 4).Value
            nbjour = 0
            For j = 5 To 27 Step 2 ' 27 car 27ème colonne = on va jusqu'à la colonne AA (à changer si plus de jours)
                jour = .Cells(base - 1, j).Value
                For i = base + 1 To base + 8
                    If .Cells(i, j).Value = "" Then
                        poids = "0"
                        projet = "pas de projet"
                        tache = "pas de tache"
                    Else
                        poids = .Cells(i, 4).Value
                        projet = .Cells(i, j).Value
                        tache = .Cells(i, j + 1).Value
                    End If
                    big_tableau(nbperso - 1, nbjour, i - 1 - base, 0) = nom
                    big_tableau(nbperso - 1, nbjour, i - 1 - base, 1) = jour
                    big_tableau(nbperso - 1, nbjour, i - 1 - base, 2) = poids
                    big_tableau(nbperso - 1, nbjour, i - 1 - base, 3) = projet
                    big_tableau(nbperso - 1, nbjour, i - 1 - base, 4) = tache
                    jourmax = jourmax + 1
                Next
                nbjour = nbjour + 1
            Next
        nbperso = nbperso + 1
        Next
    End With
     
     
    'on vide le tableau global avant de faire les calculs
    For i = 0 To 2
        For j = 0 To 11
            Sheets("Global").Range(Sheets("Global").Cells(9 + i * 4, 7 + j * 4), Sheets("Global").Cells(11 + i * 4, 8 + j * 4)).ClearContents
        Next
    Next
     
    'on "ratisse" le big_tableau en croisant les critères
    z = 7
    For i1 = 0 To 1
        For i2 = 0 To 364
            For i3 = 0 To 7
     
                Select Case Month(big_tableau(i1, i2, i3, 1))
                        Case 1
                            varz = z + i1
                        Case 2
                            varz = z + i1 + 4
                        Case 3
                            varz = z + i1 + 8
                        Case 4
                            varz = z + i1 + 12
                        Case 5
                            varz = z + i1 + 16
                        Case 6
                            varz = z + i1 + 20
                        Case 7
                            varz = z + i1 + 24
                        Case 8
                            varz = z + i1 + 28
                        Case 9
                            varz = z + i1 + 32
                        Case 10
                            varz = z + i1 + 36
                        Case 11
                            varz = z + i1 + 38
                        Case 12
                            varz = z + i1 + 42
                End Select
     
     
                'projet A tache 1
                x = 9
                If big_tableau(i1, i2, i3, 4) = 1 And big_tableau(i1, i2, i3, 3) = "A" Then
                        Sheets("Global").Cells(x, varz).Value = Sheets("Global").Cells(x, varz).Value + big_tableau(i1, i2, i3, 2)
                End If
     
                'projet A tache 2
                x = 10
                If big_tableau(i1, i2, i3, 4) = 2 And big_tableau(i1, i2, i3, 3) = "A" Then
                        Sheets("Global").Cells(x, varz).Value = Sheets("Global").Cells(x, varz).Value + big_tableau(i1, i2, i3, 2)
                End If
     
                'projet A tache 3
                x = 11
                If big_tableau(i1, i2, i3, 4) = 3 And big_tableau(i1, i2, i3, 3) = "A" Then
                        Sheets("Global").Cells(x, varz).Value = Sheets("Global").Cells(x, varz).Value + big_tableau(i1, i2, i3, 2)
                End If
     
                'projet B tache 1
                x = 13
                If big_tableau(i1, i2, i3, 4) = 1 And big_tableau(i1, i2, i3, 3) = "B" Then
                        Sheets("Global").Cells(x, varz).Value = Sheets("Global").Cells(x, varz).Value + big_tableau(i1, i2, i3, 2)
                End If
     
                'projet B tache 2
                x = 14
                If big_tableau(i1, i2, i3, 4) = 2 And big_tableau(i1, i2, i3, 3) = "B" Then
                        Sheets("Global").Cells(x, varz).Value = Sheets("Global").Cells(x, varz).Value + big_tableau(i1, i2, i3, 2)
                End If
     
                'projet B tache 3
                x = 15
                If big_tableau(i1, i2, i3, 4) = 3 And big_tableau(i1, i2, i3, 3) = "B" Then
                        Sheets("Global").Cells(x, varz).Value = Sheets("Global").Cells(x, varz).Value + big_tableau(i1, i2, i3, 2)
                End If
     
                'projet C tache 1
                x = 17
                If big_tableau(i1, i2, i3, 4) = 1 And big_tableau(i1, i2, i3, 3) = "C" Then
                        Sheets("Global").Cells(x, varz).Value = Sheets("Global").Cells(x, varz).Value + big_tableau(i1, i2, i3, 2)
                End If
     
                'projet C tache 2
                x = 18
                If big_tableau(i1, i2, i3, 4) = 2 And big_tableau(i1, i2, i3, 3) = "C" Then
                        Sheets("Global").Cells(x, varz).Value = Sheets("Global").Cells(x, varz).Value + big_tableau(i1, i2, i3, 2)
                End If
     
                'projet C tache 3
                x = 19
                If big_tableau(i1, i2, i3, 4) = 3 And big_tableau(i1, i2, i3, 3) = "C" Then
                        Sheets("Global").Cells(x, varz).Value = Sheets("Global").Cells(x, varz).Value + big_tableau(i1, i2, i3, 2)
                End If
     
            Next
        Next
    Next
     
    End Sub
    Bertrand

  8. #8
    Futur Membre du Club
    Profil pro
    Inscrit en
    Mai 2012
    Messages
    5
    Détails du profil
    Informations personnelles :
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Mai 2012
    Messages : 5
    Points : 6
    Points
    6
    Par défaut
    Salut Bertrand

    ça marche impecc en effet
    j'ai passé qq heures ce matin pour identifier les variables en cas de modification des variables (nb personnes, nb de projets, nb de taches) et je pense avoir compris.

    Je vais l'implémenter en situation réelle et je te dirai où je bloque.

    big big merci Bertrand

  9. #9
    Membre confirmé Avatar de Bear the french
    Homme Profil pro
    Inscrit en
    Mai 2012
    Messages
    353
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Saône et Loire (Bourgogne)

    Informations forums :
    Inscription : Mai 2012
    Messages : 353
    Points : 633
    Points
    633
    Par défaut
    Bonjour Max,

    Ravi que cela te plaise
    Je viens de donner un deuxième coup de lifting (les 144 lignes deviennent 95 lignes) :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    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
    Sub sousformedetable()
     
    Dim nom, tache, projet As String
    Dim mois, jour As Date
    Dim poids As Double
    Dim base, nbperso, i1, i2, i3, i, j, varz, z As Integer
     
    ' big_tableau (steeve ou jean, 8 lignes possibles par jour, 5 données par lignes : nom de l'employé, jours en question, poids, projet, tache)
    Dim big_tableau(2, 365, 8, 5), tabligne As Variant
     
    ' on remplie la variable tableau VBA avec l'onglet "Journalier"
    With Sheets("Journalier")
        nbperso = 1
        ' les données du premier employé commence à la ligne 4
        ' le deuxième employé : ses données commencent 11 lignes plus bas
        For base = 4 To 15 Step 11 ' 15 car 15eme ligne pour le début du deuxième employé
            nom = .Cells(base, 4).Value
            nbjour = 0
            For j = 5 To 27 Step 2 ' 27 car 27ème colonne = on va jusqu'à la colonne AA (à changer si plus de jours)
                jour = .Cells(base - 1, j).Value
                For i = base + 1 To base + 8
                    If .Cells(i, j).Value = "" Then
                        poids = "0"
                        projet = "pas de projet"
                        tache = "pas de tache"
                    Else
                        poids = .Cells(i, 4).Value
                        projet = .Cells(i, j).Value
                        tache = .Cells(i, j + 1).Value
                    End If
                    big_tableau(nbperso - 1, nbjour, i - 1 - base, 0) = nom
                    big_tableau(nbperso - 1, nbjour, i - 1 - base, 1) = jour
                    big_tableau(nbperso - 1, nbjour, i - 1 - base, 2) = poids
                    big_tableau(nbperso - 1, nbjour, i - 1 - base, 3) = projet
                    big_tableau(nbperso - 1, nbjour, i - 1 - base, 4) = tache
                    jourmax = jourmax + 1
                Next
                nbjour = nbjour + 1
            Next
        nbperso = nbperso + 1
        Next
    End With
    'on vide le tableau global avant de faire les calculs
    For i = 0 To 2
        For j = 0 To 11
            Sheets("Global").Range(Sheets("Global").Cells(9 + i * 4, 7 + j * 4), Sheets("Global").Cells(11 + i * 4, 8 + j * 4)).ClearContents
        Next
    Next
    ' le numéro des lignes de l'onglet global
    tabligne = Array(9, 10, 11, 13, 14, 15, 17, 18, 19)
    'on "ratisse" le big_tableau en croisant les critères
    z = 7 'numéro de la première colonne à remplir
    For i1 = 0 To 1
        For i2 = 0 To 364
            For i3 = 0 To 7
     
                Select Case Month(big_tableau(i1, i2, i3, 1)) 'on détermine quelle colonne remplir en page "global"
                        Case 1: varz = z + i1
                        Case 2: varz = z + i1 + 4
                        Case 3: varz = z + i1 + 8
                        Case 4: varz = z + i1 + 12
                        Case 5: varz = z + i1 + 16
                        Case 6: varz = z + i1 + 20
                        Case 7: varz = z + i1 + 24
                        Case 8: varz = z + i1 + 28
                        Case 9: varz = z + i1 + 32
                        Case 10: varz = z + i1 + 36
                        Case 11: varz = z + i1 + 38
                        Case 12: varz = z + i1 + 42
                End Select
     
                Select Case big_tableau(i1, i2, i3, 3) ' on teste le nom du projet
                    Case "A" 'projet A
                        Select Case big_tableau(i1, i2, i3, 4) ' on teste le nom de la tache
                            Case 1: Sheets("Global").Cells(tabligne(0), varz).Value = Sheets("Global").Cells(tabligne(0), varz).Value + big_tableau(i1, i2, i3, 2)
                            Case 2: Sheets("Global").Cells(tabligne(1), varz).Value = Sheets("Global").Cells(tabligne(1), varz).Value + big_tableau(i1, i2, i3, 2)
                            Case 3: Sheets("Global").Cells(tabligne(2), varz).Value = Sheets("Global").Cells(tabligne(2), varz).Value + big_tableau(i1, i2, i3, 2)
                        End Select
                    Case "B" 'projet B
                        Select Case big_tableau(i1, i2, i3, 4) ' on teste le nom de la tache
                            Case 1: Sheets("Global").Cells(tabligne(3), varz).Value = Sheets("Global").Cells(tabligne(3), varz).Value + big_tableau(i1, i2, i3, 2)
                            Case 2: Sheets("Global").Cells(tabligne(4), varz).Value = Sheets("Global").Cells(tabligne(4), varz).Value + big_tableau(i1, i2, i3, 2)
                            Case 3: Sheets("Global").Cells(tabligne(5), varz).Value = Sheets("Global").Cells(tabligne(5), varz).Value + big_tableau(i1, i2, i3, 2)
                        End Select
                    Case "C" 'projet C
                        Select Case big_tableau(i1, i2, i3, 4) ' on teste le nom de la tache
                            Case 1: Sheets("Global").Cells(tabligne(6), varz).Value = Sheets("Global").Cells(tabligne(6), varz).Value + big_tableau(i1, i2, i3, 2)
                            Case 2: Sheets("Global").Cells(tabligne(7), varz).Value = Sheets("Global").Cells(tabligne(7), varz).Value + big_tableau(i1, i2, i3, 2)
                            Case 3: Sheets("Global").Cells(tabligne(8), varz).Value = Sheets("Global").Cells(tabligne(8), varz).Value + big_tableau(i1, i2, i3, 2)
                        End Select
                End Select
            Next
        Next
    Next
    End Sub
    ça commence à être acceptable en nombre de ligne. J'ai rajouté des commentaires pour que tu puisses t'y retrouver.

    Bertrand

  10. #10
    Futur Membre du Club
    Profil pro
    Inscrit en
    Mai 2012
    Messages
    5
    Détails du profil
    Informations personnelles :
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Mai 2012
    Messages : 5
    Points : 6
    Points
    6
    Par défaut
    wohaaa super

    merci beaucoup

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. TWS : extraction plan courant
    Par sam01 dans le forum z/OS
    Réponses: 10
    Dernier message: 15/09/2014, 15h03
  2. Procédure stockée - extraction planning
    Par RamDevTeam dans le forum SQL
    Réponses: 8
    Dernier message: 15/05/2014, 18h04
  3. Plan de Charge
    Par blackdespe dans le forum Microsoft BI
    Réponses: 2
    Dernier message: 18/10/2010, 10h33
  4. planning de charges
    Par fabouz85 dans le forum IHM
    Réponses: 1
    Dernier message: 24/03/2009, 17h22
  5. Saisie d'un plan de charge
    Par skunk23 dans le forum IHM
    Réponses: 1
    Dernier message: 19/04/2008, 16h59

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo