Bonjour,
Je suis sur Excel 2016.
J'ai créé une macro permettant de faire une mise en forme conditionnelle mais elle colorie également les cellules vides.
Comment faire pour ne pas prendre en compte les cellules vides ?
Voici le code :
Sub EGT()
Dim j As Integer
For j = 6 To 100
If Cells(17, j) >= -1 And Cells(17, j) <= 27 And Cells(8, j) < 418 Or Cells(8, j) > 649 Then
Cells(8, j).Interior.ColorIndex = 3
Cells(8, j).Font.ColorIndex = 1
ElseIf Cells(17, j) < -1 And Cells(8, j) < 365 Or Cells(8, j) > 632 Then
Cells(8, j).Interior.ColorIndex = 3
Cells(8, j).Font.ColorIndex = 1
ElseIf Cells(17, j) > 27 And Cells(8, j) < 520 Or Cells(8, j) > 655 Then
Cells(8, j).Interior.ColorIndex = 3
Cells(8, j).Font.ColorIndex = 1
End If
Next
End Sub
Merci d'avance !