Multiple Conditional Formatting

AbrahamGluck

Board Regular
Joined
Apr 12, 2016
Messages
129
Office Version
  1. 365
Platform
  1. Windows
SymbolPriceStrikeType
AAPL$95.00$85.00Put
AAPL$95.00$85.00Call

<tbody>
</tbody>


What I want to do is a conditional formating the column of Strikes, that needs to met 2 criterias,
if the type is a "call" then if is below the stock price should be highlighted,
and if a put is resulting for the type then what's above the stock price should be highlighting

Thank you
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Highlight the Strike values (in your example, that will be C2:C3). Select Conditional Formatting, New Rule, use a formula, =AND(D2="Call",C2 < B2) format how you'd like.<b2) format="" how="" you'd="" like.<="" html=""></b2)>
 
Last edited:
Upvote 0
This will probably work nice for the Call types, will this work for the puts type their is greater then the stock price?
 
Upvote 0
Highlight the Strike column, which I assume is C and use this formula:
=XOR($D1="Put",$C1<$B1)

It should work for both calls and puts, if those are the only 2 values in column D.

63falcondude, your formula with the AND will never highlight a Put. You could add a second rule:
=AND(D2="Put",C2 > B2)

but the XOR handles both cases.
 
Upvote 0
Highlight the Strike column, which I assume is C and use this formula:
=XOR($D1="Put",$C1<$B1)

It should work for both calls and puts, if those are the only 2 values in column D.

63falcondude, your formula with the AND will never highlight a Put. You could add a second rule:
=AND(D2="Put",C2 > B2)

but the XOR handles both cases.

Thank you! this is exactly what I want and works for puts and calls, (cell $B$1 i changed from being $B1, for my purpose of use)

to make it even better I would like to know if you can do this with a lookup function (and still use it in the conditional formating) =XOR($D1="Put",$C1<$B$1) instead of just formulating $C1<$B1 look it up the symbol and find the price, the lookup value is not all the time the same cell, but its will always be the first value that find in column A from the row we are staying to the way up, let say we're in cell C7 the value to lookup will be in cell A7 and if nothing there then the next place is A6 all the way up

AAPL95.00
GOOG77.00
AMZN66.00
SPY55.00
QQQ44.00
DIA100.00
GLD23.00
USO11.00
TLT144.00
MSFT32.00

<tbody>
</tbody>
 
Upvote 0
I'm not entirely sure what your table looks like.

If it looks like this:

ABCD
1SymbolPriceStrikeType
2AAPL$95.00$85.00Put
3$85.00Call
4GOOG7755Put
544Put
688Put
799Call
8AMZN6660Call
962Call
1070Call
11

<tbody>
</tbody>
Sheet1



you can select range C2:C999 (or whatever), and use this formula:
=XOR(D2="Put",C2< LOOKUP(2^99,B$2:B2))*(C2<>"")
 
Upvote 0
I'm not entirely sure what your table looks like.

If it looks like this:

ABCD
1SymbolPriceStrikeType
2AAPL$95.00$85.00Put
3$85.00Call
4GOOG7755Put
544Put
688Put
799Call
8AMZN6660Call
962Call
1070Call
11

<tbody>
</tbody>
Sheet1



you can select range C2:C999 (or whatever), and use this formula:
=XOR(D2="Put",C2< LOOKUP(2^99,B$2:B2))*(C2<>"")
Thanks Eric!
really amazing how this workout, I have no idea how this works, it's very interesting. Cool.
 
Upvote 0

Forum statistics

Threads
1,214,887
Messages
6,122,095
Members
449,064
Latest member
Danger_SF

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