View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
SimonCC SimonCC is offline
external usenet poster
 
Posts: 79
Default How many IF functions can you have?

The Excel limit for nested IF is 7. Looks like you're right at the limit, so
you'll be ok as long as you don't add another IF. Nothing happens when your
5th IF (W32="Yes") is true, because you have already covered all the
possibilities by the 3rd IF (U32="Yes"). So basically no matter what the
combination of your 4 cells are, it will not go any further than the 3rd IF.

Don't really know how to correct the formula because I don't know what's the
exact conditions you want. Maybe if you write it out in words I can figure
out the formula to use.

-Simon


"heater" wrote:

I have the following formula:
=IF(AND(S32="Yes",U32="Yes",W32="Yes",Y32="Yes"),Z 32+AA32+AB32+AC32,IF(U32="",Z32,IF(U32="Yes",Z32+A A32,IF(W32="",Z32+AA32,IF(W32="Yes",Z32+AA32+AB32, IF(Y32="",Z32+AA32+AB32,IF(Y32="Yes",Z32+AA32+AB32 +AC32,IF(M32="No",0))))))))

The problem is when W32 is "Yes". It does not add the totals in Z32,AA32, &
AB32. However, when S32, U32, W32, & Y32 = "Yes", then the total of all four
cells totals the correct total. There probably is an easier formula.