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

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

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,123,426
Messages
5,601,595
Members
414,462
Latest member
StageRiis

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top