sassriverrat
Well-known Member
- Joined
- Oct 4, 2018
- Messages
- 655
Hey Guys, quick question.
Cell R17 is a time value in hours, input by the user as "HH.h" meaning its hours and a decimal (5.5 hours for example).
Cell D8 is a whole number (hours) (5 hours)
Cell F8 is a whole number (minutes) (30 minutes)
I'd like a quick IF Then that says IF R17 > (D8 + (F8/60)) Then
N10 = "Error"
Here's what I have, but it doesn't work:
Cell R17 is a time value in hours, input by the user as "HH.h" meaning its hours and a decimal (5.5 hours for example).
Cell D8 is a whole number (hours) (5 hours)
Cell F8 is a whole number (minutes) (30 minutes)
I'd like a quick IF Then that says IF R17 > (D8 + (F8/60)) Then
N10 = "Error"
Here's what I have, but it doesn't work:
Code:
If Range("R17") > (Range("D8") + (Range("F8") / 60)) Then
Range("N10").FormulaR1C1 = "=Error"
End If