Search : in
By :

“False” result not working on IF formula

Last answer on Jul 17, 2009 5:24:18 pm BST Di, on Jul 16, 2009 4:49:35 pm BST 
 Report this message to moderators

Hello,
This is the formula:

=IF(Z2>=TIME(11|59|0)|"Afternoon"|"Morning")

The contents in cell Z2 is 10:31:30. I was hoping my formula result would be Morning, but it comes back as Afternoon. Please help.

Configuration: Windows XP Internet Explorer 7.0

Best answers for « “False” result not working on IF formula » in :
[VBA] Detecting changes in cell Show[VBA] Detecting changes in cell The Event Change feature of a sheet will detects the change in the active cell but it gives no information about the content. The example given below will help you to find out if the cell was changed,...
[Myth] Linux is an equivalent to Windows ShowLinux is an equivalent to Windows Myth Reality Explanations Myth Linux is an equivalent to Windows. Reality FALSE Explanations If we can do almost the same things with Linux and Windows, these operating systems are fundamentally...
Excel – Formula for cell calculation ShowExcel – Formula for cell calculation Issue Solution Note Issue Simple formula of =J3-SUM(L3:X3) BUT if J3 is empty then I want the formula to run as =C3-SUM(L3:X3) What is the proper formula to get the calculation to utilize J3 if...
Spreadsheet - Formulas ShowIntroduction to Formulas The main use of a spreadsheet is to automate calculations, which means using cells to perform operations based on values in other cells. The spreadsheet recalculates all the values each time a change is made to the value of...
Spreadsheets - Conditional expressions ShowWhat is a Conditional Structure? Conditional structures are instructions that allow to test if a condition is true or not. Conditional structures may be associated together. To successfully execute these tests using logical functions, spreadsheets...

1

aquarelle, on Jul 16, 2009 9:03:11 pm BST

Hello,

Try with this formula :
=IF(AND(HOUR(Z2)>11,MINUTE(Z2)>=0,SECOND(Z2)>=0),"Afternoon","Morning")

Best regards "Pour trouver une solution à ses problèmes, il faut s'en donner la peine."

Reply to aquarelle

2

Di, on Jul 16, 2009 10:34:42 pm BST

It kind of works if I only use the hours. When I try the whole formula it gives me an error. I might be able to make it work with just the hours.

Thanks.

Reply to Di

3

Di, on Jul 17, 2009 3:57:52 pm BST

This is what I’ve been trying to accomplish if cell Z2 less than 12 return Morning, if less than 16 return Afternoon, if less than 18 return Evening, if less than 20 return Night, if any other time return Closed.

This is the formula I used that works:

=IF(AND(HOUR(X2)<12)|"Morning"|IF(AND(HOUR(X2)<16)|"Afternoon"|IF(AND(HOUR(X2)<18)|"Evening"|IF(AND(HOUR(X2)<20)|"Night"|"Closed"))))


Thank you "AQUARELLE" for starting me on the right track.

Reply to Di

4

 aquarelle, on Jul 17, 2009 5:24:18 pm BST

Hi,
Happy to learn that my formula has been able to put you in the right track. I wish you good continuation. :)
Best regards "Pour trouver une solution à ses problèmes, il faut s'en donner la peine."

Reply to aquarelle