Bonjour,
sans savoir ce qui n'est pas correct je propose :
Option Explicit
Sub Consolid()
Dim c, u As Range
Dim plage As Range
Dim pos As Long
Dim val1 As Long
Dim val2 As Long
Dim compd As Long
Dim compg As Long
'sommes horizontales :
For Each u In Range("a8:a38")
Set plage = Range(u.Offset(0, 1), u.Offset(0, 2))
compd = 0
compg = 0
For Each c In plage
If Not c Like ("" & "\" & "") Then
If c <> "" Then
pos = InStr(1, c.Value, "\", vbTextCompare)
val1 = CLng(Trim(Left(c.Value, pos - 1)))
compd = compd + val1
val2 = CLng(Trim(Right(c.Value, Len(c.Value) - pos - 1)))
compg = compg + val2
End If
End If
Next c
u.Offset(0, 3).Value = compd & " \ " & compg
Next u
End Sub