daillest319
Programmer
i wanted to check AD for yesterday's date using an if statement if the column has yest date or if it doesn't
i know in vba i have it written like so just dont know how to conver it to vbs
i know in vba i have it written like so just dont know how to conver it to vbs
Code:
Sub Macro1()
For Each cell In Range("AD1:AD" & Cells(Rows.Count, "AD").End(xlUp).Row)
If IsDate(cell.Value) Then
If cell.Value = Date - 1 Then
MsgBox "date is correct"
Else
MsgBox "date is incorrect"
End If
End If
Next
End Sub