Bonjour,

J'ai 12 colonnes et je cherche à remplir la premiere ligne de chaque colonne avec la somme de production des lignes en dessous

6 8 10 ...

1 4 5 ...
2 0 2 ...
3 4 3 ...

Voici mon code:

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
Sub TOTAL()
 
Dim i As Integer
Dim j As Integer
Dim prod As Double
 
 
For i = 1 To 2000 Step 1
 
 
   If Range("C" & i) = "Puissance" Then
 
 For j = 1 To 12 Step 1
 
     prod = Cells(i , j).Value + prod
 
  End If
 
Next i
 
   Next j
 
 Cells(1, j).Value = prod
 
End Sub
Rien n'y fait je perds la boule... quelqu'un pourrait m'éclairer SVP?