View Single Post
  #5  
Old June 25th, 2004, 07:52 PM
Harlan Grove
external usenet poster
 
Posts: n/a
Default Formula is sending me over the edge

" wrote...
Because of your note, I had to re-think what I was doing
and Lo and Behold, I got the formula to work It's
below for your future reference. Thanks a million times
over.

=IF(OR(AND('Appendix B'!D8="(47780)",J19-K190),
(ISNUMBER(FIND("53",'Appendix B'!D9))),
(ISNUMBER(FIND("C",'Appendix B'!D9))),
(ISNUMBER(FIND("P",'Appendix B'!D9)))
*AND(J19-K190)),0,+J19-K19)


Indenting terms with underscores, this becomes

IF(
__OR(
____AND(
______'Appendix B'!D8="(47780)",
______J19-K190
____),
____(ISNUMBER(FIND("53",'Appendix B'!D9))),
____(ISNUMBER(FIND("C",'Appendix B'!D9))),
____(ISNUMBER(FIND("P",'Appendix B'!D9)))*AND(J19-K190)
__),
__0,
__+J19-K19
)

Do you really want to apply the AND(J19-K190) test only when 'Appendix B'!D9
contains 'P'? That's what your formula does. Your original formula,

=IF(OR(AND('Appendix B'!D8="(47780)",J19-K190),
AND(OR('Appendix B'!D9="C",'Appendix B'!D9="P",
'Appendix B'!D9="53S"),J19-K190)),0,+J19-K19)

makes it appear you want to apply the J19-K190 test to all 'Appendix B'!D9
cases. Starting with your original formula, you could try

=IF(AND(J19K19,OR('Appendix B'!D8="(47780)",
SUM(COUNTIF('Appendix B'!D9,"*"&{"C","P","53"}&"*")))),0,J19-K19)

--
To top-post is human, to bottom-post and snip is sublime.