Formula to change cell color when stock price is within 10% of 52 week high/low

ontheroadagain

New Member
Joined
Aug 26, 2015
Messages
1
In cell F4, I have the current stock price. In cell J4, I have the 52 week high price. In cell L4 I have the 52 week low price. Are there formulas I can use to change the cell color as follows:

1) Change the color of the value in F4:
*if that price is within 10% of the value in cell J4, to BLUE
*if that price is within 10% of the value in cell L4, to RED

OR

2) Change the color of the values in J4 and L4
*if the price in J4 or L4, is within 10% of the value in cell F4 then the color in J4 would change to BLUE for J4 and the color would change to RED for L4

Thank you!
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Yes - Use conditional formatting.

Select the cell F4. Go to Conditional Formatting, select New Rule. Click on 'Use a Formula to det...'
Enter this formula
=AND(J4>F4*0.9,J4<F4*1.1)
Do the same again and enter the same formula but change the J4 to L4.

Now use the Format Painter to format the rest of the column in the same way.

Option2 is probably better as you can then see when both are within 10%, but now you can devise the formulas yourself (I hope)
 
Upvote 0

Forum statistics

Threads
1,215,013
Messages
6,122,690
Members
449,092
Latest member
snoom82

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