View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Pete_UK Pete_UK is offline
external usenet poster
 
Posts: 8,856
Default LOOOONG if statement out of room, need help to shorten

In Excel 2003 and earlier there is a limit to the number of nested
functions you can have (of 8). This applied to all nested functions,
not just IF, and you have several ANDs as well as IFs. You might get
some joy by joining G4, E8 and F8 together in a helper column, then
you might be able to use VLOOKUP for some of the formula.

Hope this helps.

Pete

On Nov 5, 7:44*pm, Btate0121
wrote:
This has had me stumped for a couple of days, and I'm absolutely convinced
it's a simple fix. LOL. *anyone have any suggestions on how to shorten this
if statement because excel keeps throwing out error windows at me saying
there's a problem with my formula

=IF($B8="","",IF(AND($G$4="Cost",$E8<"",$F8=""),$B 8*CT$4-FT8,IF(AND($G$4="C*ost",$E8<"",$F8="x"),$B8*CT$4-GA8,IF(AND($G$4="Cost",$C8<""),$B8*CT$4-H8,IF*(CU9="X","STD",IF(AND($G$4="Sales",$E8<"",$F 8=""),$B8*CT$4-FT8,IF(AND($G$4=*"Sales",$E8<"",$F8="x"),$B8*CT$4-GA8,IF(and($G$4="Sales",$C8<""),$B8*CT$4-H*8,"n/a"))))))))