Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Nested IF AND OR function Inexplicable error
I have the following formula which I believe does not breach any rules, yet
it returns an error message. Can anyone see where my error is? I would much appreciate any help, and thank you in advance. I don't believe I am breaching the max 7 arguments rule. =if(OR (AND(J44="GreenAbove",J43="GreenAbove",J42="RedBel ow"), AND(J44="GreenAbove",J43="GreenBelow",J42="RedBelo w"), AND(J44="GreenBelow",J43="GreenBelow",J42="GreenBe low",J41="RedBelow")), C44,"") |
#2
|
|||
|
|||
I used
=IF(OR(AND(J44="GreenAbove",J43="GreenAbove",J42=" RedBelow"),AND(J44="GreenAbove",J43="GreenBelow",J 42="RedBelow"),AND(J44="GreenBelow",J43="GreenBelo w",J42="GreenBelow",J41="RedBelow")),C44,"x") and the cell correctly displayed an x. I am using XL 2003 What error are you getting? You do know the first 2 ANDs are the same? best wishes -- Bernard V Liengme www.stfx.ca/people/bliengme remove caps from email "MichaelC" wrote in message ... I have the following formula which I believe does not breach any rules, yet it returns an error message. Can anyone see where my error is? I would much appreciate any help, and thank you in advance. I don't believe I am breaching the max 7 arguments rule. =if(OR (AND(J44="GreenAbove",J43="GreenAbove",J42="RedBel ow"), AND(J44="GreenAbove",J43="GreenBelow",J42="RedBelo w"), AND(J44="GreenBelow",J43="GreenBelow",J42="GreenBe low",J41="RedBelow")), C44,"") |
#4
|
|||
|
|||
Excel doesn't like line breaks before the parentheses -- try:
=IF(OR( AND(J44="GreenAbove",J43="GreenAbove",J42="RedBelo w"), AND(J44="GreenAbove",J43="GreenBelow",J42="RedBelo w"), AND(J44="GreenBelow",J43="GreenBelow",J42="GreenBe low", J41="RedBelow")),C44,"") "MichaelC" wrote in message ... I have the following formula which I believe does not breach any rules, yet it returns an error message. Can anyone see where my error is? I would much appreciate any help, and thank you in advance. I don't believe I am breaching the max 7 arguments rule. =if(OR (AND(J44="GreenAbove",J43="GreenAbove",J42="RedBel ow"), AND(J44="GreenAbove",J43="GreenBelow",J42="RedBelo w"), AND(J44="GreenBelow",J43="GreenBelow",J42="GreenBe low",J41="RedBelow")), C44,"") |
#5
|
|||
|
|||
On Mon, 22 Aug 2005 12:35:01 -0700, "MichaelC"
wrote: I have the following formula which I believe does not breach any rules, yet it returns an error message. Can anyone see where my error is? I would much appreciate any help, and thank you in advance. I don't believe I am breaching the max 7 arguments rule. =if(OR (AND(J44="GreenAbove",J43="GreenAbove",J42="RedBe low"), AND(J44="GreenAbove",J43="GreenBelow",J42="RedBel ow"), AND(J44="GreenBelow",J43="GreenBelow",J42="GreenB elow",J41="RedBelow")), C44,"") After I removed all the line breaks, there was no error message. =IF(OR( AND(J44="GreenAbove",J43="GreenAbove",J42="RedBelo w"), AND(J44="GreenAbove",J43="GreenBelow",J42="RedBelo w"), AND(J44="GreenBelow",J43="GreenBelow",J42="GreenBe low",J41="RedBelow")), C44,"") If you enter line breaks in the formula, I have found it necessary to put them just AFTER a "(" rather than before it. See the difference in our first lines above. --ron |
#6
|
|||
|
|||
I copied your formula to a worksheet and it works for me.
My guess is that the error is in one of the cells J44, J43,J42 or more likely C44. What is the exact error message you are getting? "MichaelC" wrote: I have the following formula which I believe does not breach any rules, yet it returns an error message. Can anyone see where my error is? I would much appreciate any help, and thank you in advance. I don't believe I am breaching the max 7 arguments rule. =if(OR (AND(J44="GreenAbove",J43="GreenAbove",J42="RedBel ow"), AND(J44="GreenAbove",J43="GreenBelow",J42="RedBelo w"), AND(J44="GreenBelow",J43="GreenBelow",J42="GreenBe low",J41="RedBelow")), C44,"") |
#7
|
|||
|
|||
Thanks all who responded to this - my problem remains after removing the line
breaks entirely, and checking the input cells (C44 is a number 1.2042). The error message occurs when I hit Enter after typing in the formula: "The formula you typed contains an error: For info about fixing.... To get assistance ... etc etc" The part of the formula highlighted by the error message is the second "GreenAbove" after J44. I am using Microsoft Excel 2000. "Martin P" wrote: I copied your formula to a worksheet and it works for me. My guess is that the error is in one of the cells J44, J43,J42 or more likely C44. What is the exact error message you are getting? "MichaelC" wrote: I have the following formula which I believe does not breach any rules, yet it returns an error message. Can anyone see where my error is? I would much appreciate any help, and thank you in advance. I don't believe I am breaching the max 7 arguments rule. =if(OR (AND(J44="GreenAbove",J43="GreenAbove",J42="RedBel ow"), AND(J44="GreenAbove",J43="GreenBelow",J42="RedBelo w"), AND(J44="GreenBelow",J43="GreenBelow",J42="GreenBe low",J41="RedBelow")), C44,"") |
#8
|
|||
|
|||
Problem solved - BUT I DON'T KNOW WHY!!
I copied the formulae that you said worked for you into a fresh Excel workbook and it indeed did work. Then I copied that cell back into my original workbook replacing the original formula and .... it worked. Got me stumped! But now I can continue my work and thanks to all who helped, Bernard, Sandy, Bob, Ron and Martin P. "MichaelC" wrote: Thanks all who responded to this - my problem remains after removing the line breaks entirely, and checking the input cells (C44 is a number 1.2042). The error message occurs when I hit Enter after typing in the formula: "The formula you typed contains an error: For info about fixing.... To get assistance ... etc etc" The part of the formula highlighted by the error message is the second "GreenAbove" after J44. I am using Microsoft Excel 2000. "Martin P" wrote: I copied your formula to a worksheet and it works for me. My guess is that the error is in one of the cells J44, J43,J42 or more likely C44. What is the exact error message you are getting? "MichaelC" wrote: I have the following formula which I believe does not breach any rules, yet it returns an error message. Can anyone see where my error is? I would much appreciate any help, and thank you in advance. I don't believe I am breaching the max 7 arguments rule. =if(OR (AND(J44="GreenAbove",J43="GreenAbove",J42="RedBel ow"), AND(J44="GreenAbove",J43="GreenBelow",J42="RedBelo w"), AND(J44="GreenBelow",J43="GreenBelow",J42="GreenBe low",J41="RedBelow")), C44,"") |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Error Handling #N/A with AVERAGE Function - Average of values in Row | Excel Worksheet Functions | |||
undefined function error when creating xls pivot from mdb qry | Excel Worksheet Functions | |||
Excel option to store trendline's coefficients in cells for use | Charts and Charting in Excel | |||
Automatically up date time in a cell | Excel Discussion (Misc queries) | |||
Lookup Function Error | Excel Worksheet Functions |