close

I have these 2 formulas:Formula1=IF(OR(AND(K5lt;2;F5lt;=-0.25);AND(K5gt;=2;K5lt;=5;F5lt;=-0.4);AND(K5gt;5;K5lt;=10;F5lt;=-0.5);AND(K5gt;10;K5lt;=20;F5lt;=-0.8);AND(K5gt;20;F5lt;=-1));quot;Checkquot;;quot;quot;)

Formula2=IF(H5=quot;sellquot;;K5-M5;N5-K5)

Formula2 is used in Formula1 where F5 is referenced. Is it possible to place
formula 2 into formula1 directly so I do not need an additional cell
refernced ?

Thank you in advance.

You should be able to just whack it in

=IF(OR(AND(K5lt;2,IF(H5=quot;sellquot;,K5-M5,N5-K5)lt;=-0.25),AND(K5gt;=2,K5lt;=5,IF(H5=quot;sel
lquot;,K5-M5,N5-K5)lt;=-0.4),

AND(K5gt;5,K5lt;=10,IF(H5=quot;sellquot;,K5-M5,N5-K5)lt;=-0.5),AND(K5gt;10,K5lt;=20,IF(H5=quot;sel
lquot;,K5-M5,N5-K5)lt;=-0.8),AND(K5gt;20,IF(H5=quot;sellquot;,K5-M5,N5-K5)lt;=-1)),
quot;Checkquot;,quot;quot;)

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

quot;carlquot; gt; wrote in message
...
gt; I have these 2 formulas:
gt;
gt;
gt;
Formula1=IF(OR(AND(K5lt;2;F5lt;=-0.25);AND(K5gt;=2;K5lt;=5;F5lt;=-0.4);AND(K5gt;5;K5lt;=10
;F5lt;=-0.5);AND(K5gt;10;K5lt;=20;F5lt;=-0.8);AND(K5gt;20;F5lt;=-1));quot;Checkquot;;quot;quot;)
gt;
gt; Formula2=IF(H5=quot;sellquot;;K5-M5;N5-K5)
gt;
gt; Formula2 is used in Formula1 where F5 is referenced. Is it possible to
place
gt; formula 2 into formula1 directly so I do not need an additional cell
gt; refernced ?
gt;
gt; Thank you in advance.
That would make the formula unreadable!

An alternative suggestion :
use Insert Name and create a name MYTEST with this formula
=(Sheet1!$H$5=quot;sellquot;)*(Sheet1!$K$5-Sheet1!$M$5) (Sheet1!$H$5lt;gt;quot;sellquot;)*(Sheet1!$N$5-Sheet1!$K$5)
Omit the Sheet1 stuff when you type it in - copy and paste this:
=($H$5=quot;sellquot;)*($K$5-$M$5) ($H$5lt;gt;quot;sellquot;)*($N$5-$K$5)

Now modify your Formula1 to read
Formula1=IF(OR(AND(K5lt;2;MYTESTlt;=-0.25);AND(K5gt;=2;MYTESTlt;=5;MYTESTlt;=-0.4);AND(K5gt;5;K5lt;=10;MYTESTlt;=-0.5);AND(K5gt;10;K5lt;=20;MYTESTlt;=-0.8);AND(K5gt;20;MYTESTlt;=-1));quot;Checkquot;;quot;quot;)

I had to make up an addition formula in Insert | Name since you cannot use
IF in a defined formula.
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

quot;carlquot; gt; wrote in message
...
gt;I have these 2 formulas:
gt;
gt;
gt; Formula1=IF(OR(AND(K5lt;2;F5lt;=-0.25);AND(K5gt;=2;K5lt;=5;F5lt;=-0.4);AND(K5gt;5;K5lt;=10;F5lt;=-0.5);AND(K5gt;10;K5lt;=20;F5lt;=-0.8);AND(K5gt;20;F5lt;=-1));quot;Checkquot;;quot;quot;)
gt;
gt; Formula2=IF(H5=quot;sellquot;;K5-M5;N5-K5)
gt;
gt; Formula2 is used in Formula1 where F5 is referenced. Is it possible to
gt; place
gt; formula 2 into formula1 directly so I do not need an additional cell
gt; refernced ?
gt;
gt; Thank you in advance.

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

    software

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