=IF(((Sheet1!E6=quot;xquot;)*OR(Sheet1!F6=quot;xquot;)*OR(E6=quot;xquot;)* OR(F6=quot;xquot;)),quot;xquot;,(IF((E6=Sheet1!E6)*AND(F6=Sheet1!F 6),3,(IF((E6-F6)=(Sheet1!E6-Sheet1!F6),2,(IF((SIGN(E6-F6))=(SIGN(Sheet1!E6-Sheet1!F6)),1,0)))))))
I want it that if any of the 4 first statements = x that it returns a value
of x. All the fields in Sheet1!E^ and Sheet1!F^ are x. The problem i am
getting is that its returning a value of #VALUE. Not the x i am expecting.
It seems the or statement isnt working the way i expect.
=IF(OR(Sheet1!E6=quot;xquot;,Sheet1!F6=quot;xquot;,E6=quot;xquot;,F6=quot;xquot;), quot;xquot;,
IF(AND(E6=Sheet1!E6,F6=Sheet1!F6),3,
IF(E6-F6=Sheet1!E6-Sheet1!F6,2,
IF(SIGN(E6-F6)=SIGN(Sheet1!E6-Sheet1!F6),1,0))))
--
HTH
Bob Phillips
(remove xxx from email address if mailing direct)
quot;Markquot; gt; wrote in message
...
gt;
=IF(((Sheet1!E6=quot;xquot;)*OR(Sheet1!F6=quot;xquot;)*OR(E6=quot;xquot;)* OR(F6=quot;xquot;)),quot;xquot;,(IF((E6=Sh
eet1!E6)*AND(F6=Sheet1!F6),3,(IF((E6-F6)=(Sheet1!E6-Sheet1!F6),2,(IF((SIGN(E
6-F6))=(SIGN(Sheet1!E6-Sheet1!F6)),1,0)))))))
gt;
gt; I want it that if any of the 4 first statements = x that it returns a
value
gt; of x. All the fields in Sheet1!E^ and Sheet1!F^ are x. The problem i am
gt; getting is that its returning a value of #VALUE. Not the x i am
expecting.
gt; It seems the or statement isnt working the way i expect.
- May 16 Wed 2007 20:37
How do i get the if statement i nthis formula to work
close
全站熱搜
留言列表
發表留言