Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
carl
 
Posts: n/a
Default 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.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default 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.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernard Liengme
 
Posts: n/a
Default 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.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Countif formulas change after doing a sort Bob Smith Excel Worksheet Functions 3 January 3rd 06 11:17 PM
Array Formulas take waaaay too long... belly0fdesire Excel Worksheet Functions 7 August 8th 05 10:11 PM
Combining two formulas Redsmartie Excel Worksheet Functions 2 April 7th 05 09:52 AM
Combining formulas and results HELP!! JRH New Users to Excel 4 January 22nd 05 05:26 PM
combining countif formulas Liz G Excel Worksheet Functions 3 November 1st 04 09:34 PM


All times are GMT +1. The time now is 12:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"