I want to create a button which will do the following. - Retrieve the current date and time --> - This date and time plus the time in (O2) --> - In the range of cells (L2:L11) needs to be displayed if the current time plus the time in cell O2 is less or more than the date and time in the cell next to it (Range M2:M11). The cell L2 will be compared with M2, L3 with M3 etc.
On any current time, you will be able to click on the button and it will calculate if it is on time or too late.
I know how to get the current date but can't get any further.
Click here for the image with the cells
Sub OnTime()
With Range("L2:L11")
.Value = Now()
.NumberFormat = "mm/dd/yyyy h:mm:ss AM/PM"
End With
End Sub