Bonjour,
J'essaye de me débrouiller en code, j'en tenter un truc et j'aurai avoir vos retours si la façon de faire, j'ai comme l'impression que c'est un peu lourd tout ça
Application.ScreenUpdating = False
Set F1 = Worksheets("repart")
With F1
Set Plage = .Range("N3:N59")
End With
For Z = 3 To 29 Step 1
For Each cell In Plage
cell.Select
If cell.Value = Cells(Z, 3).Value Then Selection.Interior.Color = F1.Cells(Z, 3).Interior.Color
If cell.Value = Cells(Z, 3).Value Then Selection.Font.Color = F1.Cells(Z, 3).Font.Color
cell.Select
If cell.Value = Cells(Z, 5).Value Then Selection.Interior.Color = F1.Cells(Z, 5).Interior.Color
If cell.Value = Cells(Z, 5).Value Then Selection.Font.Color = F1.Cells(Z, 5).Font.Color
cell.Select
If cell.Value = Cells(Z, 7).Value Then Selection.Interior.Color = F1.Cells(Z, 7).Interior.Color
If cell.Value = Cells(Z, 7).Value Then Selection.Font.Color = F1.Cells(Z, 7).Font.Color
cell.Select
If cell.Value = Cells(Z, 9).Value Then Selection.Interior.Color = F1.Cells(Z, 9).Interior.Color
If cell.Value = Cells(Z, 9).Value Then Selection.Font.Color = F1.Cells(Z, 9).Font.Color
Next
Next Z
Application.ScreenUpdating = True
End Sub
J'ai tenté de simplifier surtout les cell.Select mais la macro fonctionne plus par la suite
Si vous pouvez me dire comment vous faites pour simplifier un code
Merci pour votre aide