time compare formula

kksj

New Member
Joined
Sep 12, 2002
Messages
3
I need to create a formula that compares the actual time in one cell (=now()) from a set time in another cell, producing some text like no when the actual time is less (earlier) than the set time and some text like yes when the actual time is more (later) than the set time.
Is this possible and how?
Who can help me out?
 

Some videos you may like

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying

chrisrick

New Member
Joined
Jul 3, 2002
Messages
42
Try:

=If(a1<b1,"Before",If(a1>b1,"After","Same"))

Where a1 = user set date and b1 = now()

(there is a less than sign between first a1 and b1, and a greater than sign between the second a1 and b1(does't seem to work on my machine)
This message was edited by chrisrick on 2002-09-13 07:13
 

gnaga

Well-known Member
Joined
Jul 9, 2002
Messages
680
Office Version
  1. 365
  2. 2016
  3. 2013
Platform
  1. Windows
First convert all your Data into hh:mm format

Then Use

=If(A1>B1,"Yes",If(A1<B1,"No"),"Same Time")

If current time is more than set time then "Yes". If current time is less than set time then "No" else "Same Time"

Where A1 houses Current Time & B1 houses Set time.

GNaga
 

Watch MrExcel Video

Forum statistics

Threads
1,118,811
Messages
5,574,452
Members
412,595
Latest member
slim313
Top