Share via

IF function using a cell with NOW function

Anonymous
2021-10-21T19:37:29+00:00

In cell A1, I have the =Now() & formatted to h:mm, and in cell A2 I am using the function =If(A1>=TIMEVALUE("18:00"),"True","False")

Result always gives me True. Please help me figure what I am writing incorrectly.

Thanks"

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

HansV 462.6K Reputation points
2021-10-21T19:55:44+00:00

NOW() returns both the date and time, even if the number format displays only the time. TIMEVALUE("18:00") returns only a time.

Use this instead:

=IF(HOUR(A1)>=18,"True","False")

or even

=HOUR(A1)>=18

Was this answer helpful?

0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2021-10-21T20:08:37+00:00

    Thank you, works great

    Was this answer helpful?

    0 comments No comments