how to use if condition in time vba

The solution for “how to use if condition in time vba” can be found here. The following code will assist you in solving the problem.

If Time > TimeValue(“6:30:00”) And Time <= TimeValue("14:30:00") Then Range("F" & Target.Row) = "1st Shift"


If Time > TimeValue(“14:30:01”) And Time <= TimeValue("23:30:00") Then Range("F" & Target.Row) = "2nd Shift"


If Time > TimeValue(“23:30:01”) And Time <= TimeValue("6:30:00") Then Range("F" & Target.Row) = "Overtime"

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

Similar Posts