need help on conditional formulas

sfinns

New Member
Joined
Jan 23, 2012
Messages
12
With regard to a spreadsheet I am building on when to buy and sell stocks i need some help on contructing a formula that buys stock when certain conitions are true and avoids thm when they are not ie two columns and the conditions below
column 1column 2right answer
-0.0009-0.002Buy
-0.0017-0.003Buycolumn 1 when >0 "sell" stock
-0.0004-0.002Buycolumn 2 when <0 "buy "stock back
-0.0008-0.002Buy
0.0001-0.002Buybut overide when column 1 is<0 always "buy"
0.0005-0.002Buy
0.0020-0.001Buyhow do I build a formula that achives this ?? and labels buy or blank in column 3
0.0016-0.001Buy
0.0024-0.001Buy
0.0026-0.001Buy
0.00380.001
0.00370.000
0.00450.001
0.00420.001
0.00440.002
0.00410.001
0.00420.002
0.00440.002
0.00360.002
0.00390.002
0.00210.001
0.00140.000
0.0000-0.001
-0.0009-0.002Buy
-0.0010-0.002Buy
-0.0013-0.003Buy
-0.0009-0.003Buy
-0.0012-0.004Buy
-0.0012-0.004Buy
-0.0005-0.004Buy
-0.0002-0.004Buy
0.0011-0.004Buy
0.0016-0.004Buy
0.0025-0.004Buy
0.0031-0.003Buy
0.0045-0.003Buy
0.0049-0.002Buy
0.0065-0.002Buy
0.0068-0.001Buy
0.00830.000Buy
0.00840.000
0.00930.000
0.00900.001
0.01000.001
0.00960.002
0.00960.001
0.01030.003
0.01040.002
0.00840.002
0.01040.003
0.00880.002
0.01140.005
0.01070.005
0.01240.007
0.01120.007
0.01150.008
0.00860.006
0.00820.007
0.00710.007
0.00530.006
0.00500.006
0.00210.005
0.00070.004
-0.00160.003Buy

<colgroup><col style="width: 51pt; mso-width-source: userset; mso-width-alt: 2486;" span="2" width="68"> <col style="width: 48pt;" span="7" width="64"> <tbody>
</tbody>
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Hi,

wouldn't something like =IF(A2<0,"buy",IF(C2<0,"buy","")) work for you?
what if value =zero?<style><!--table {mso-displayed-decimal-separator:"\."; mso-displayed-thousand-separator:"\,";} @page {margin:1.0in .75in 1.0in .75in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-page-orientation:landscape;} td {padding-top:1px; padding-right:1px; padding-left:1px; mso-ignore:padding; color:black; font-size:12.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Calibri, sans-serif; mso-font-charset:0; mso-number-format:General; text-align:general; vertical-align:bottom; border:none; mso-background-source:auto; mso-pattern:auto; mso-protection:locked visible; white-space:nowrap; mso-rotate:0;} .xl63 {vertical-align:middle; white-space:normal;} --> </style>

<colgroup><col style="width:65pt" width="65"> </colgroup><tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,215,477
Messages
6,125,031
Members
449,205
Latest member
Eggy66

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top