hi all,
im trying to write an if stament to check for yest date in coulmn AD. what i wrote so far it not working properly. any help would be great thanks!!!





Sub Macro1()


    Range("AD1:AD10000").Select
        
         If Date = Date - 1 Then
            MsgBox "date is correct"
            Else
            MsgBox "date is incorrect"
            End If
         

End Sub