Bonjour les amis,
j'utilise ce code pour calculer la somme dans des cellules précises, mais j'ai remarqué que ce code ne prend pas en considération les virgules. Comment faire ?

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
 
Private Sub CommandButton2_Click()
 
 
Dim total As Long
total = WorksheetFunction.Sum(Range("D9:D11"))
Range("D12").Value = total
 
total = WorksheetFunction.Sum(Range("D13:D14"))
Range("D15").Value = total
 
total = WorksheetFunction.Sum(Range("D18:D22"))
Range("D23").Value = total
 
total = WorksheetFunction.Sum(Range("D24:D27"))
Range("D28").Value = total
 
total = WorksheetFunction.Sum(Range("D29:D32"))
Range("D33").Value = total
End sub