![]() |
Combining 2 Formulas
I have these 2 formulas:
Formula1=IF(OR(AND(K5<2;F5<=-0.25);AND(K5=2;K5<=5;F5<=-0.4);AND(K55;K5<=10;F5<=-0.5);AND(K510;K5<=20;F5<=-0.8);AND(K520;F5<=-1));"Check";"") Formula2=IF(H5="sell";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. |
Combining 2 Formulas
You should be able to just whack it in
=IF(OR(AND(K5<2,IF(H5="sell",K5-M5,N5-K5)<=-0.25),AND(K5=2,K5<=5,IF(H5="sel l",K5-M5,N5-K5)<=-0.4), AND(K55,K5<=10,IF(H5="sell",K5-M5,N5-K5)<=-0.5),AND(K510,K5<=20,IF(H5="sel l",K5-M5,N5-K5)<=-0.8),AND(K520,IF(H5="sell",K5-M5,N5-K5)<=-1)), "Check","") -- HTH Bob Phillips (remove nothere from the email address if mailing direct) "carl" wrote in message ... I have these 2 formulas: Formula1=IF(OR(AND(K5<2;F5<=-0.25);AND(K5=2;K5<=5;F5<=-0.4);AND(K55;K5<=10 ;F5<=-0.5);AND(K510;K5<=20;F5<=-0.8);AND(K520;F5<=-1));"Check";"") Formula2=IF(H5="sell";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. |
Combining 2 Formulas
That would make the formula unreadable!
An alternative suggestion : use Insert Name and create a name MYTEST with this formula =(Sheet1!$H$5="sell")*(Sheet1!$K$5-Sheet1!$M$5)+(Sheet1!$H$5<"sell")*(Sheet1!$N$5-Sheet1!$K$5) Omit the Sheet1 stuff when you type it in - copy and paste this: =($H$5="sell")*($K$5-$M$5)+($H$5<"sell")*($N$5-$K$5) Now modify your Formula1 to read Formula1=IF(OR(AND(K5<2;MYTEST<=-0.25);AND(K5=2;MYTEST<=5;MYTEST<=-0.4);AND(K55;K5<=10;MYTEST<=-0.5);AND(K510;K5<=20;MYTEST<=-0.8);AND(K520;MYTEST<=-1));"Check";"") 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 "carl" wrote in message ... I have these 2 formulas: Formula1=IF(OR(AND(K5<2;F5<=-0.25);AND(K5=2;K5<=5;F5<=-0.4);AND(K55;K5<=10;F5<=-0.5);AND(K510;K5<=20;F5<=-0.8);AND(K520;F5<=-1));"Check";"") Formula2=IF(H5="sell";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. |
All times are GMT +1. The time now is 08:20 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com