Add multiple "if" formulas or make a short formula

vishu

Board Regular
Joined
Oct 26, 2011
Messages
70
Office Version
  1. 2016
Platform
  1. Windows
I have A to J column that provides buy sell with targets with stop loss
In the cell, "J3 " shows whether the price is triggered or not now want. To add more formulas in the same cell which shows a target hit 1 2 3 and if price moves above 3 than out of range should display

Buy Sell Formula.xlsx
ABCDEFGHIJ
1
2Magic Number9.32EntryIni.Tgt.1st Tgt.2nd Tgt.3rd TgtStrict SLLast Traded Price
3578.00Buy>582.66584.99588.72591.98594.31578.09589BUY
4Sell<573.34571.01567.28564.02561.69
Sheet1
Cell Formulas
RangeFormula
B2B2=C3-C4
D3D3=C3+(B2*0.25)
E3E3=C3+(B2*0.65)
F3F3=C3+B2
G3G3=C3+(B2*1.25)
H3H3=AVERAGE(C3:C4)+B2/100
D4D4=C4-(B2*0.25)
E4E4=C4-(B2*0.65)
F4F4=C4-B2
G4G4=C4-(B2*1.25)
J3J3=IF(A3<I3,IF(I3>C3,"BUY","B Near SL"),IF(I3<C4,"SELL","S Near SL"))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
J3Cell Valuecontains "SELL"textYES
J3Cell Valuecontains "BUY"textYES
A1Cell Value="LONG"textYES
A1Cell Value="SHORT"textYES
C1Cell Value="LONG"textYES
C1Cell Value="SHORT"textYES
 

Attachments

  • screenshot.jpeg
    screenshot.jpeg
    35 KB · Views: 4
I have tested each condition individually - All are giving FALSE as result. Now you have to test and see what exact conditions you want to reflect a particular message and set Formula accordingly. I can't comment on conditions, I can only test validity of formula.

Best wishes

Excel Formula:
=IF(AND(N7<V6,V6>P6,V6>T6,V6>S6),"Buy Tgt 3 done",
IF(AND(N7<V6,V6>P6,V6>S6,V6>R6),"Buy Tgt 2 done",
IF(AND(N7<V6,V6>P6,V6>R6,V6>Q6),"Buy Tgt 1 done",
IF(AND(N7<V6,V6>P6,V6>Q6,V6>N7),"Buy Ini Tgt done",
IF(AND(N7<V6,V6>P6),"BUY",
IF(AND(U6<V6,U6>N7),"BUY WAIT",
IF(AND(N7<V6,V6>P6),"BUY",
IF(AND(U6<P7),"BUY SL HIT",
IF(AND(N7>V6,V6<P7,V6<T7,V6<S7),"Sell Tgt 3 done",
IF(AND(N7>V6,V6<P7,V6<S7,V6<R7),"Sell Tgt 2 done",
IF(AND(N7>V6,V6<P7,V6<R7,V6<Q7),"Sell Tgt 1",
IF(AND(N7>V6,V6<P7,V6<Q7,V6<N7),"Sell Ini Tgt done",
IF(AND(N7>V6,V6<P7),"SELL",
IF(AND(U6>V6,U6<N7),"SELL WAIT",
IF(AND(N7>V6,V6<P7),"SELL",
IF(U6<P7,"SELL SL HIT"))))))))))))))))
 
Upvote 0

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
I have tested each condition individually - All are giving FALSE as result. Now you have to test and see what exact conditions you want to reflect a particular message and set Formula accordingly. I can't comment on conditions, I can only test validity of formula.

Best wishes

Excel Formula:
=IF(AND(N7<V6,V6>P6,V6>T6,V6>S6),"Buy Tgt 3 done",
IF(AND(N7<V6,V6>P6,V6>S6,V6>R6),"Buy Tgt 2 done",
IF(AND(N7<V6,V6>P6,V6>R6,V6>Q6),"Buy Tgt 1 done",
IF(AND(N7<V6,V6>P6,V6>Q6,V6>N7),"Buy Ini Tgt done",
IF(AND(N7<V6,V6>P6),"BUY",
IF(AND(U6<V6,U6>N7),"BUY WAIT",
IF(AND(N7<V6,V6>P6),"BUY",
IF(AND(U6<P7),"BUY SL HIT",
IF(AND(N7>V6,V6<P7,V6<T7,V6<S7),"Sell Tgt 3 done",
IF(AND(N7>V6,V6<P7,V6<S7,V6<R7),"Sell Tgt 2 done",
IF(AND(N7>V6,V6<P7,V6<R7,V6<Q7),"Sell Tgt 1",
IF(AND(N7>V6,V6<P7,V6<Q7,V6<N7),"Sell Ini Tgt done",
IF(AND(N7>V6,V6<P7),"SELL",
IF(AND(U6>V6,U6<N7),"SELL WAIT",
IF(AND(N7>V6,V6<P7),"SELL",
IF(U6<P7,"SELL SL HIT"))))))))))))))))
Best idea is to create a dummy data and manipulate data the way you want and test various conditions.

This way you will be able to test each condition that you want to have is working properly.

Best wishes
 
Upvote 0
Best idea is to create a dummy data and manipulate data the way you want and test various conditions.

This way you will be able to test that each condition that you want to have is working properly.

Best wishes
just want to try if any formula which works smoothly here. Not very keen to use other cells and thanks buddy, for helping hard.
 
Upvote 0
Best idea is to create a dummy data and manipulate data the way you want and test various conditions.

This way you will be able to test each condition that you want to have is working properly.

Best wishessa

Sanjay ji please if you found any solution will be very helpful.
 
Upvote 0
Sanjay ji please if you found any solution will be very helpful.
Vishu you have to create a Dummy data on another sheet and try what you want to achieve. I built the formula I gave you that way only - Making and checking every condition at a time. There can be no other way. Further, you are using Excel 2016 so have to work with the version limitations.
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,250
Members
452,623
Latest member
Techenthusiast

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