What's wrong with this formula?


Posted by Cliff on January 09, 2002 5:50 PM

I'm trying to use this formula to check for 10 and 11, using this gives me a blank. How can I check for two conditions in the same cell using this formula?

=IF('D:\docs\[LABOR.XLS]Mgmt. Schedule'!$H$7>=10/24 <=11/24,'D:\docs\[LABOR.XLS]Mgmt. Schedule'!$D$7,IF('D:\docs\[LABOR.XLS]Mgmt. Schedule'!$H$8>=10/24 <=11/24,'D:\docs\[LABOR.XLS]Mgmt. Schedule'!$D$8,IF('D:\docs\[LABOR.XLS]Mgmt. Schedule'!$H$9>=10/24 <=11/24,'D:\docs\[LABOR.XLS]Mgmt. Schedule'!$D$9,IF('D:\docs\[LABOR.XLS]Mgmt. Schedule'!$H$10>=10/24 <=11/24,'D:\docs\[LABOR.XLS]Mgmt. Schedule'!$D$10,IF('D:\docs\[LABOR.XLS]Mgmt. Schedule'!$H$11>=10/24 <=11/24,'D:\docs\[LABOR.XLS]Mgmt. Schedule'!$D$11,"")))))

Posted by Jacob on January 09, 2002 6:27 PM

Hi

Try something like this.

If you want to find a 10 and 11 then

if(and(something = 10,somethingelse=11),true,false)

for 10 or 11

if(or(something=10, somethingelse=11),true,false)


HTH

Jacob



Posted by Tom Dickinson on January 09, 2002 9:41 PM

Explanation

Unless they have come up with something I don't know about, you can not specify a range; you have to specify a range using 2 comparisons. Jacob is correct. To use your outside If/Then:
=If(And(H7>=10,H7<=11),D7,...)

Also, are you looking for a date? you have specified 10/24 and 11/24 as your parameters, both of which evaluate to less than 0.5.