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?
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

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
723
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
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,852
Messages
5,833,979
Members
430,249
Latest member
Muka

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