View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Cerealkiller Cerealkiller is offline
external usenet poster
 
Posts: 4
Default Excel formual IF statement Help

Thank you very much for you rapid response and it works very well. I am new
to OfficeKB so thank you for answering my question. I was not sure on how to
appropriately list questions and what information to add, but in the future I
will. I really do appreciate your help and hopefully if I have any other
questions or problems I would gladly accept any advice you can provide.

Ron Rosenfeld wrote:
I am trying to make this IF statement work

=IF(A4="",0,IF((A4="F"),B4,IF((A4="D"),B4,IF((A4 ="T"),B4,IF((A4="S"),C4,IF(
(A4="M"),C4,IF((A4="L"),C4,IF((A4="H"),C4,IF((A4 ="G"),C4,IF((A4="C"),C4,"ERR")
)))))))


It is helpful if you tell us what the problem is. Knowing that you apparently
cannot make this work is not very useful information when you don't tell us
either the version of Excel you are using, or what your function is doing
incorrectly.

Your formula, as written, does not have enough close parentheses at the end.

=IF(A4="",0,IF((A4="F"),B4,IF((A4="D"),B4,IF((A4= "T"),B4,IF((A4="S"),C4,IF(
(A4="M"),C4,IF((A4="L"),C4,IF((A4="H"),C4,IF((A4= "G"),C4,IF((A4="C"),C4,"ERR")
)))))))))

seems to work perfectly OK on my computer. But I am using Excel 2007 which is
not limited to seven levels of nesting as are earlier versions of Excel. Also,
Excel should have corrected your formula.

Could it be that you are using an earlier version? If so, you will be limited
to seven nesting levels. That being the case, your formula can be simplified:

=IF(A4="",0,IF(OR(A4={"F","D","T"}),B4,
IF(OR(A4={"S","M","L","H","G","C"}),C4,"ERR")))

But if there is some other problem that you are concerned with, you'll need to
provide more detail.
--ron