ThrottleWorks
Excel Ninja
Hi,
I have column AR, values in the column are time such as 6:40:24 AM.
In column AS, I need to populate value "Yes" if the time is lesser than 14 hours.
I am trying to this by following code, but it is not working.
Can anyone help me in this please.
[pre]
[/pre]
I have column AR, values in the column are time such as 6:40:24 AM.
In column AS, I need to populate value "Yes" if the time is lesser than 14 hours.
I am trying to this by following code, but it is not working.
Can anyone help me in this please.
[pre]
Code:
Dim rng20 As Range
Set rng20 = Range("ar2:ar" & endrow)
For Each rn In rng20
If rn.Value < Hour(14) Then
rn.Offset(0, 1).Value = "Yes"
Else
rn.Offset(0, 1).Value = ""
End If
Next rn