ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do i get the if statement i nthis formula to work (https://www.excelbanter.com/excel-discussion-misc-queries/88261-how-do-i-get-if-statement-i-nthis-formula-work.html)

Mark

How do i get the if statement i nthis formula to work
 
=IF(((Sheet1!E6="x")*OR(Sheet1!F6="x")*OR(E6="x")* OR(F6="x")),"x",(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.

Bob Phillips

How do i get the if statement i nthis formula to work
 
=IF(OR(Sheet1!E6="x",Sheet1!F6="x",E6="x",F6="x"), "x",
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)

"Mark" wrote in message
...

=IF(((Sheet1!E6="x")*OR(Sheet1!F6="x")*OR(E6="x")* OR(F6="x")),"x",(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)))))))

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.





All times are GMT +1. The time now is 08:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com