I am trying to write a code that will check the date in a list of cells, and if that date has passed, then clear that cell and change a cell in the same row. So cells G2:G35 have dates and E2:E35 has a drop down menu with "YES" and "NO". If the date in "G" has passed then clear that cell and change the drop down to "NO" the associated "E" cell. There is also another date column, "L" with drop down menu in "K". This macro will run when the workbook is opened.
Private Sub Workbook_Open()
Dim ReturnDate As Date
Dim TheDate As Date
TheDate = Date
ReturnDate = Range("G2:G35, L2:L4, L7:L9, L11:L16, L19, L20")
If ReturnDate <= TheDate Then
????
End Sub
Bookmarks