IF and NOW() together in formula

liquid25

Board Regular
Joined
Apr 3, 2005
Messages
65
I want a formula to return zero if the current time is after 6PM and 1 if not. Is there a formula that can acheive this?

Cheers
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

liquid25

Board Regular
Joined
Apr 3, 2005
Messages
65
cheers, that's great.

in what format does the time need to be in cell A1?

can it be the function NOW()?
 
Upvote 0

nbrcrunch

Well-known Member
Joined
Jan 1, 2003
Messages
2,062
please try it before asking. it is so much easier to try something like this than wait for answer.
 
Upvote 0

Nimrod

MrExcel MVP
Joined
Apr 29, 2002
Messages
6,259
ADVERTISEMENT
I tried PennySavers solution with a now() and it worked fine !

=IF(NOW()>0.75,0,1)
 
Upvote 0

nbrcrunch

Well-known Member
Joined
Jan 1, 2003
Messages
2,062
Brian:

I deleted it. the first time I tried it, it didn't work (for some unknown reason). But when I saw the 2nd post, I went back and tried it again.

Every so often either it must be my install of Excel or (more likely) I typed something different than what I thought I typed (as a formula). Sometimes I will try so many variations of a formula that I can't remember what I have & haven't tried. Either during my sleep or fresh the next day, it comes to me what I need to do.
 
Upvote 0

Brian from Maui

MrExcel MVP
Joined
Feb 16, 2002
Messages
8,459
nbrcrunch said:
Brian:

I deleted it. the first time I tried it, it didn't work (for some unknown reason). But when I saw the 2nd post, I went back and tried it again.

Every so often either it must be my install of Excel or (more likely) I typed something different than what I thought I typed (as a formula). Sometimes I will try so many variations of a formula that I can't remember what I have & haven't tried. Either during my sleep or fresh the next day, it comes to me what I need to do.

Not a problem.... :LOL:

Happens to me ALL the time!
 
Upvote 0

Forum statistics

Threads
1,195,858
Messages
6,011,979
Members
441,661
Latest member
Pammie007

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