IF DATE and TIME

AtTcQ

New Member
Joined
Jan 10, 2020
Messages
15
Office Version
  1. 2019
Platform
  1. Windows
I currently use this to check if date has passed but i also need to set a time on it too. Is it possible?

VBA Code:
=IF(B:B>TODAY(),"Not Passed","Passed")
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Try this

Cell A1: 10/01/2020 23:30:00
VBA Code:
=IF(VALUE(A1)>VALUE(NOW()), "Not passed", "Passed")
 
Upvote 0
Try this

Cell A1: 10/01/2020 23:30:00
VBA Code:
=IF(VALUE(A1)>VALUE(NOW()), "Not passed", "Passed")

Sorry i forgot to mention i want to add a specific time not the current time e.g 23:00
 
Upvote 0
One way...

Book1
ABC
104/12/2020 14:41:00Not passed
204/12/2020 14:39:00Passed
Sheet3
Cell Formulas
RangeFormula
C1:C2C1=IF(A1>=(DATEVALUE("04/12/2020")+TIMEVALUE("14:40")), "Not passed", "Passed")
 
Upvote 0
Can i still use the TODAY function without actually putting a date in?

Tried this but its saying "Passed"
=IF(D:D>TODAY()+TIMEVALUE("22:00"),"Not passed", "Passed" )
 
Upvote 0
Can i still use the TODAY function without actually putting a date in?
You can't use it for an entire column like that, best describe exactly what you are trying to achieve.
 
Upvote 0
Even when i set it to the selected column it still doesnt work
 
Upvote 0
I meant row*
Post a sample of your data using the board XL2BB app and describe exactly what you are trying to do.
Post number 4 was directly from the worksheet and as I stated you can't apply it to an entire column which is what D:D is.
 
Upvote 0

Forum statistics

Threads
1,212,933
Messages
6,110,752
Members
448,295
Latest member
Uzair Tahir Khan

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
Back
Top