IF DATE and TIME

AtTcQ

New Member
Joined
Jan 10, 2020
Messages
15
Office Version
2019
Platform
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")
 

juddaaaa

Board Regular
Joined
Jan 4, 2020
Messages
76
Office Version
365
Platform
Windows
Try this

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

AtTcQ

New Member
Joined
Jan 10, 2020
Messages
15
Office Version
2019
Platform
Windows
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
 

MARK858

MrExcel MVP
Joined
Nov 12, 2010
Messages
11,487
Office Version
365, 2010
Platform
Windows, Mobile
One way...

xl2bb.xlam
ABC
104/12/2020 14:41:00
204/12/2020 14:39:00
Sheet3
Cell Formulas
Range(s)Formula
C1:C2C1=IF(A1>=(DATEVALUE("04/12/2020")+TIMEVALUE("14:40")), "Not passed", "Passed")
 

AtTcQ

New Member
Joined
Jan 10, 2020
Messages
15
Office Version
2019
Platform
Windows
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" )
 

MARK858

MrExcel MVP
Joined
Nov 12, 2010
Messages
11,487
Office Version
365, 2010
Platform
Windows, Mobile
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.
 

AtTcQ

New Member
Joined
Jan 10, 2020
Messages
15
Office Version
2019
Platform
Windows
Even when i set it to the selected column it still doesnt work
 

MARK858

MrExcel MVP
Joined
Nov 12, 2010
Messages
11,487
Office Version
365, 2010
Platform
Windows, Mobile
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.
 

Forum statistics

Threads
1,081,953
Messages
5,362,349
Members
400,673
Latest member
mikansang

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top