1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| Private Sub Worksheet_Activate()
Dim derlignebase As Long
Dim i As Long
Dim col As Byte
'détermine la dernier cellule
derlignebase = Cells.Find("*", , , , xlByRows, xlPrevious).Row
col = 19 'prochaine colonne = 21
'ce chiffre correspond a la colonne de recherche
For i = 3 To derlignebase
If Range(Cells(i, col), Cells(i, col)) = Date Then Range(Cells(i, col + 1), Cells(i, col + 1)).Select
'Next i
If Cells(i, col) = Date Then
Cells(i, col + 1).Interior.color = RGB(252, 249, 111)
Cells(i, col + 1).Select
End If
Next i
End Sub |
Partager