I am trying to do a simple IF statement of something in a time format. For example, =IF(A1=TIME(8,30,0),1,2). I have my cell A1 formatted to 24 hour time (i.e. 08:30), but I can never return a true result. Any thoughts?
I am trying to do a simple IF statement of something in a time format. For example, =IF(A1=TIME(8,30,0),1,2). I have my cell A1 formatted to 24 hour time (i.e. 08:30), but I can never return a true result. Any thoughts?
Last edited by bigmantitus; 06-24-2013 at 02:28 PM.
Your formula works for me..
Regards
Fotis.
-This is my Greek whisper to Europe.
--Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.
Advanced Excel Techniques: http://excelxor.com/
--KISS(Keep it simple Stupid)
--Bring them back.
---See about Acropolis of Athens.
--Visit Greece.
Is A1 a real time value, without a date part?
If posting code please use code tags, see here.
You can extract the time part from A1 and use that in the formula.
Formula:Please Login or Register to view this content.
Can you upload an example workbook?
Click on GO ADVANCED and use the paperclip icon to open the upload window.
View Pic
This formula gives a 1 if it is true and a 2 if it is falsePlease Login or Register to view this content.
If you want 'TRUE' or 'FALSE' as a result use this formula
Please Login or Register to view this content.
Last edited by popipipo; 06-24-2013 at 12:36 PM.
Willem
English is not my native language sorry for errors
Please correct me if I'm completely wrong
I have attached the simple workbook. What it eventually displays (either a number or true/false) doesn't matter since I can always customize the true and false results of the IF statement. What I cannot get it to do is ever yield a true result using the TIME function (which is the only way I can think of to try this).
It's a rounding/floating point problem.
Try this instead, though I'm sure there's a better way.
Formula:Please Login or Register to view this content.
That worked! Thanks much.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks