Option Explicit
Sub The_Compilator_Calculator()
Dim WS As Worksheet, WSCible As Worksheet
Dim Plage As Range, CellCible As Range
Dim x As Integer
Set WSCible = ThisWorkbook.Worksheets('Compil')
For Each WS In ThisWorkbook.Worksheets
If Not WS.Name = WSCible.Name Then
With WS
Set Plage = .Range(.Range('A2'), .Range('D65536').End(xlUp))
End With
Set CellCible = WSCible.Range('A65536').End(xlUp)
Plage.Copy CellCible.Offset(1, 0)
For x = 1 To Plage.Rows.Count
On Error GoTo TheEnd
CellCible.Offset(x, 4) = Plage(x, 3) * Plage(x, 4)
Next
End If
Next
Exit Sub
TheEnd:
If Err = 13 Then
MsgBox 'Valeur Non-Numérique dans les Plage à compiler', vbCritical
Else
MsgBox 'Erreur non gérée : ' & Err.Number & ' ' & Err.Description, vbExclamation
End If
End Sub