Usine à gaz
XLDnaute Barbatruc
Bonjour à tous,
Encore besoin d'aide !!!
Avec votre aide, j'ai pu adapter ce code qui fonctionne très bien :
Sub Lrouges()
Application.ScreenUpdating = False
Sheets("SM (2)").Select
ActiveSheet.Unprotect
Dim i As Integer
For i = 4 To 150
If Cells(i, 351) > 0.5 Then 'n°Col
Range("LZ" & i & ":MM" & i).Font.Color = -16776961
Else
Range("LZ" & i & ":MM" & i).Font.ColorIndex = xlAutomatic
End If
Next i
End Sub
mais j'ai besoin qu'elle s'exécute selon trois conditions :
>0.5
>1
>2
Nul en VBA, j'ai essayé sans succès plusieurs variantes mais je n'y arrive pas.
Auriez-vous la solution ou pourriez-vous me guider ?
D'avance merci,
Amicalement,
Lionel,
Encore besoin d'aide !!!
Avec votre aide, j'ai pu adapter ce code qui fonctionne très bien :
Code:
Application.ScreenUpdating = False
Sheets("SM (2)").Select
ActiveSheet.Unprotect
Dim i As Integer
For i = 4 To 150
If Cells(i, 351) > 0.5 Then 'n°Col
Range("LZ" & i & ":MM" & i).Font.Color = -16776961
Else
Range("LZ" & i & ":MM" & i).Font.ColorIndex = xlAutomatic
End If
Next i
End Sub
Code:
mais j'ai besoin qu'elle s'exécute selon trois conditions :
>0.5
>1
>2
Nul en VBA, j'ai essayé sans succès plusieurs variantes mais je n'y arrive pas.
Auriez-vous la solution ou pourriez-vous me guider ?
D'avance merci,
Amicalement,
Lionel,