If time<15:00, "A2","A3"

mickeystanford_alumni

Board Regular
Joined
May 11, 2022
Messages
115
Office Version
  1. 2021
Platform
  1. Windows
  2. MacOS
Hello everyone, hope you are doing well.
I am trying to make an IF formula linking it to the exact time of the day.
So, if time right now is 11:00 (=TIME), I want excel to say:

A4=IF(A1<15:00, "A2","A3"), where A2 and A3 is two different values.

The only issue I face here is that the =TIME is tricky to make it higher or lower compared to 15:00...

Any suggestions or ideas?

Thank you
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Are you looking for something like this:
Excel Formula:
=IF(HOUR(A1)<15, "A2","A3")
 
Upvote 0
An alternative in A4 just in case you ever need it to not be exactly on the hour or greater than (Also assumed that "A2" and "A3" are actually cell references)

Book1.xlsb
A
110:45
2AAA
3BBB
4AAA
5AAA
Sheet4
Cell Formulas
RangeFormula
A4A4=IF(A1<TIMEVALUE("15:00"), A2,A3)
A5A5=IF(HOUR(A1)<15, A2,A3)


Book1.xlsb
A
116:55
2AAA
3BBB
4BBB
5BBB
Sheet4
Cell Formulas
RangeFormula
A4A4=IF(A1<TIMEVALUE("15:00"), A2,A3)
A5A5=IF(HOUR(A1)<15, A2,A3)
 
Last edited:
Upvote 0
Solution

Forum statistics

Threads
1,213,546
Messages
6,114,251
Members
448,556
Latest member
peterhess2002

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