ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   'plus or minus' conditional operation (https://www.excelbanter.com/excel-discussion-misc-queries/162191-plus-minus-conditional-operation.html)

King of Salem

'plus or minus' conditional operation
 
I am trying to determine whether or not a value falls within a specification.
If A1 is -0.285, for example, and I want to say IF(ABS(A1)=0±0.5, "Pass",
"Fail") This will allow me to quickly see that if A1 is 0 plus or minus 0.5,
then it displays whether A1 passes the specification or not. Any suggestions?

Dave O

'plus or minus' conditional operation
 
=IF(ABS(a1)<=0.5,"Pass","Fail")

....is my suggestion. But verify the "or equal to" part of the logic.


Dave Peterson

'plus or minus' conditional operation
 
=if(abs(a1-0)<.5,"pass","fail")
or
=if(abs(a1-0)<=.5,"pass","fail")

In your case, you don't need to include the -0.
=if(abs(a1)<.5,"pass","fail")
or
=if(abs(a1)<=.5,"pass","fail")

(I don't know what happens at .5)

King of Salem wrote:

I am trying to determine whether or not a value falls within a specification.
If A1 is -0.285, for example, and I want to say IF(ABS(A1)=0±0.5, "Pass",
"Fail") This will allow me to quickly see that if A1 is 0 plus or minus 0.5,
then it displays whether A1 passes the specification or not. Any suggestions?


--

Dave Peterson

T. Valko

'plus or minus' conditional operation
 
One way:

=IF(ISNUMBER(A1),IF(AND(A1=-0.5,A1<=0.5),"Pass","Fail"),"")

--
Biff
Microsoft Excel MVP


"King of Salem" <King of wrote in message
...
I am trying to determine whether or not a value falls within a
specification.
If A1 is -0.285, for example, and I want to say IF(ABS(A1)=0±0.5, "Pass",
"Fail") This will allow me to quickly see that if A1 is 0 plus or minus
0.5,
then it displays whether A1 passes the specification or not. Any
suggestions?




Bill Kuunders

'plus or minus' conditional operation
 
Or you simply use the conditional formatting tool.
Go to ..<Format<condional formating<cell value isbetween -0.5 and
0.5..........and set the format you want.
Using font colour or pattern.

--
Greetings from New Zealand
"King of Salem" <King of wrote in message
...
I am trying to determine whether or not a value falls within a
specification.
If A1 is -0.285, for example, and I want to say IF(ABS(A1)=0±0.5, "Pass",
"Fail") This will allow me to quickly see that if A1 is 0 plus or minus
0.5,
then it displays whether A1 passes the specification or not. Any
suggestions?




King of Salem[_2_]

'plus or minus' conditional operation
 
Thanks. I will try one or all of those suggestions out. I appreciate your
help.

King of Salem[_2_]

'plus or minus' conditional operation
 
It seems that what ended up working for me was:

=IF(AND(ABS(A1)=0,ABS(A1)<=0.5),"Pass","Fail")

Thank you for your assistance!!

David Biddulph[_2_]

'plus or minus' conditional operation
 
What does the ABS(A1)=0 test do?
--
David Biddulph

"King of Salem" wrote in message
...
It seems that what ended up working for me was:

=IF(AND(ABS(A1)=0,ABS(A1)<=0.5),"Pass","Fail")

Thank you for your assistance!!





All times are GMT +1. The time now is 12:30 AM.

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