Why IF formula still returning false even if now time false between user input?
time.png
Why IF formula still returning false even if now time false between user input?
time.png
Many members are unable to see images in the *.png format due to forum compatibility issues with some browsers.
If you need to post an image post it in the *.jpg format.
Even better than posting images... post a SMALL sample file. That way we can test solutions directly in the file with the relevant data.
Biff
Microsoft MVP Excel
Keep It Simple Stupid
Let's Go Pens. We Want The Cup.
Reuploaded using jpeg format.
sample_time.jpg
I'm not getting the same error. It works here. Not certain what the difference is with yours. sorry.
Try
Formula:Please Login or Register to view this content.
atul
If my answer (or that of other members) has helped you, please say "Thanks" by clicking the Add Reputation button at the foot of one of their posts.
Also: if your problem is solved, please take the time to mark your thread as SOLVED by going to the top of your first post, selecting "Thread Tools" and then "Mark thread as solved".
It's the same here and I believe it has something to do with the NOW() function including the date, although I'm not sure. Just as an aside, in an IF statement with TRUE and FALSE, you do not need inverted commas:
=IF(AND(A1>C1,A1<D1),TRUE,FALSE)
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
NB: as a Moderator, I never accept friendship requests.
Forum Rules (updated August 2023): please read them here.
You don't need to to use IF statement in this case
Just this
Formula:Please Login or Register to view this content.
Formula will return TRUE or FALSE
If you like my answer please click on * Add Reputation
Don't forget to mark threads as "Solved" if your problem has been resolved
"Nothing is so firmly believed as what we least know."
--Michel de Montaigne
Tried everything what you have suggested. But it doesn't work. It works if you replace A1 to static time but it doesn't work when its in now() format. And this is crucial to me as formula has to run based on current time.
What has been suggested by AlKey and myself won't change anything, and avk's suggestion is just wrong. I'm afraid I don't know how to make Excel treat the NOW() value in the same way as a manually input time. I've tried custom formatting, but it makes no difference. However, I have just tried this and it works (this is in cell A1):
=TIME(TEXT(NOW(),"HH"),TEXT(NOW(),"MM"),0)
Problem solved:
With the =Now() formula you are getting back the current date and time. The manually entered times represent the time on 1/1/1900.
Change your =Now() formula to
=Now()-Int(Now())
Then it will return the time without the date portion and your comparison will work.
You have to use MOD with NOW in A1
Formula:Please Login or Register to view this content.
The only way I could get it to show today's date was using :
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks