Re : VBA: Macro n'éxécute qu'une feuille
Bonsoir bertrand1202,
Quelques correction en fonction de ce que j'ai pu comprendre
Un extrait du classeur aurait était le bienvenu !
Sub Macro1()
Dim Vligne As Long, Derlign As Long, Ws As Worksheet
For Each Ws In Worksheets
Derlign = Ws.Range("A65536").End(xlUp).Row
For Vligne = 5 To Derlign
If Ws.Cells(Vligne, 1).Value = 12 Then
Ws.Cells(Vligne, 2).Value = (Ws.Cells(Vligne, 1).Value - 20) * 5
ElseIf Ws.Cells(Vligne, 1).Value = "c" Then
Ws.Cells(Vligne, 3).Value = 14
End If
Next Vligne
Next Ws
End Sub
Cordialement
Bernard