close

Hey everyone,

I'm trying to compare two columns, and use a threshold for what type of
differences are considered OK. I developed a forumla, but just realized
that it will not work for all instances. Here's my dilema.

........... Col A ............... Col B ............ Col C
Row 1 .. 5,000 ............... 3,000 ............ OK
Row 2 .. 3,000 ............... 5,000 ............ -2000

My current formula, to account for a 0.078 threshold difference is:
=IF(N8=O8,quot;OKquot;,
IF(N8gt;=(O8 0.078),quot;OKquot;,
IF(N8gt;=(O8-0.078),quot;OKquot;,
IF(O8lt;=(N8 0.078),quot;OKquot;,
IF(O8lt;=(N8-0.078),quot;OKquot;,N8-O8)))))

I realized that this will only work for Data in Row 2. So in Row 2,
the values will fail all four IF statements, and the result will be
-2000 in Column C - this is correct. However, in Row 1, even though
the difference is larger than 0.078, the values pass for the 1st and
2nd IF statements, so they receive a value of quot;OKquot;.

Is there a way to force the formula to have to pass all statements,
before assigning quot;OKquot;?

Is there a way where I can say, IF ((Difference between N1 and O1) =
0.078 or more, THEN (N1 - O1), quot;OKquot;))Thanks for your help--
Idz21
------------------------------------------------------------------------
Idz21's Profile: www.excelforum.com/member.php...oamp;userid=30910
View this thread: www.excelforum.com/showthread...hreadid=515499
Try

=IF(ABS(N1-O1)gt;=0.078,N1-O1,quot;OKquot;)--
mphell0
------------------------------------------------------------------------
mphell0's Profile: www.excelforum.com/member.php...oamp;userid=30153
View this thread: www.excelforum.com/showthread...hreadid=515499
Hey guys,

Just wanted to let you know that I have it figured out. Someone over
at MrExcel helped me out.

Here's the answer:
=IF(ABS(N8-O8)lt;=0.078,quot;OKquot;,N8-O8)I didn't realize excel had the Absolute # formula in it.--
Idz21
------------------------------------------------------------------------
Idz21's Profile: www.excelforum.com/member.php...oamp;userid=30910
View this thread: www.excelforum.com/showthread...hreadid=515499
mphell0 Wrote:
gt; Try
gt;
gt; =IF(ABS(N1-O1)gt;=0.078,N1-O1,quot;OKquot;)
Whoops. Looks like you beat me to the punch. Thanks for your help.
That forumla did the trick.

You took the reverse approach, but both work just fine.--
Idz21
------------------------------------------------------------------------
Idz21's Profile: www.excelforum.com/member.php...oamp;userid=30910
View this thread: www.excelforum.com/showthread...hreadid=515499

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()