conditiona formatting using formula

lezawang

Well-known Member
Joined
Mar 27, 2016
Messages
1,805
Office Version
  1. 2016
Platform
  1. Windows
Hi
I have a column called Average. I want to highlight any value which is >50 to green. I know I can use heiglight cells rules but I thought of creating my own rule. I am trying to use formula. so I clicked on New Rule--> Use a formula to determine which cells to format, then I typed this inside format box >50 then clicked on Format and changed the color. But I did not work. Any idea why? or how can I get that working

[TABLE="width: 500"]
<tbody>[TR]
[TD]Average[/TD]
[/TR]
[TR]
[TD]10[/TD]
[/TR]
[TR]
[TD]55[/TD]
[/TR]
[TR]
[TD]77[/TD]
[/TR]
[TR]
[TD]40[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
When using the Formula option, you right the formula as it pertains to the first cell in your range selection (that you wish to apply the formatting to).
So if you have selected column B, for example, the first selected cell in that range is B1.
So your formula would be:
Code:
=B1 > 50
Excel will automatically adjust the formula for the other cells in your selected range.
 
Upvote 0
You are welcome!

One trap be careful to not fall into.
I have often seen people highlight a whole column, but they do not want the Conditional Formatting to apply to row 1 (title/header row).
So they will write a formula like:
Code:
=B2 > 50
That won't work correctly!
You have to write the formula as it pertains to the very first cell in your selection, not necessarily the first cell you want it applied to.
If you want to exclude the first row, there are a few different ways to go about it:
- don't select the whole column, start with row 2 and select just the cells you want to apply it to
- select the whole column, write the formula as it pertains to row 1, and then afterwards, highlight the cell in row 1 and remove the Conditional Formatting from just that cell
- add another condition to your Conditional Formatting rule that looks like:
=AND(your formula,ROW() > 1)
 
Upvote 0

Forum statistics

Threads
1,223,891
Messages
6,175,229
Members
452,621
Latest member
Laura_PinksBTHFT

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