View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default Apparently exceeds max formula length?

In Excel there is a limit of 7 to the number of if statements you can include
in a single formula... You can check out this link if you want a way around
it but you might be better off to rethink your solution...

http://www.cpearson.com/excel/nested.htm
--
HTH...

Jim Thomlinson


"BudW" wrote:

Hi,

I have an equation I'm trying to put in excel 2003. It is currently:

=IF(G3<0,"u.i less than
zero",IF(Sheet2!$A2=TRUE,Sheet1!$G3*Sheet1!$E$2,IF (Sheet2!$B2=TRUE,Sheet1!$G3*Sheet1!$E$3,IF(Sheet2! $C2=TRUE,Sheet1!$G3*Sheet1!$E$4,IF(Sheet2!$D2=TRUE ,Sheet1!$G3*Sheet1!$E$4,IF(Sheet2!$E2=TRUE,Sheet1! $G3*Sheet1!$E$5,IF(Sheet2!$F2=TRUE,Sheet1!$G3*Shee t1!$E$6,IF(Sheet2!$G2=TRUE,Sheet1!$G3*Sheet1!$E$7, "unknown"))))))))

The problem is that I need to include about 3 or 4 more IF statements
similar to the ones already in the equation. When I include one more if
statement I get an error that says there is a mistake in my formula when I
hit "OK" it highlights the latest "IF" as if there were some problem with it.
I can detect no problem.

I have noticed that in the last IF statement excel no-longer assigns a color
to the cell showing which cell you are referring to.

Could someone please tell me if I'm exceeding the max limit. Or any other
suggestions to get around this problem.

Related topic: I did have all the work in the main formula rather than
having the formula sub calculations occuring in sheet two. I ran into the
same problem. I had hoped that splitting the sub calculations out of the
original formula would help (it didn't)

Thanks in advance,
BudW