Forum Discussion
Change cell colour when a set value is reached
Will the user enter a value in that cell, or is the value the result of a formula?
- HansVogelaarJan 09, 2022MVP
You might use conditional formatting:
Select the cell (or cells) that you want to format.
Set the fill color to green (this will be the default).
On the Home tab of the ribbon, select Conditional Formatting > New Rule...
Select 'Format only cells that contain'.
Leave the first drop-down set to 'Cell Value'.
Select 'greater than or equal to' from the second drop-down.
Enter 400 in the box next to it.
Select Format...
Activate the Fill tab.
Select red.
Click OK, then click OK again.
- DjDarrellOct 29, 2024Copper Contributor
hi i wish to do something similar,
but i would like the formatting to highlight the cell in either green if it is equal to or greater than the number in the cell above it, or Amber if it is lower. but how do i get it to use the cell instead of a fixed figure please?
- HansVogelaarOct 29, 2024MVP
Let's say you have data in D2:D50. So you'd like to conditionally format D3:D50.
Select the latter range. D3 should be the active cell in the selection.
Set the fill color to amber. This will be the default.
On the Home tab of the ribbon, click Conditional Formatting > New Rule...
Select 'Format only cells that contain'.
Leave the first drop down set to 'Cell Value'.
Select 'greater than or equal to' from the second drop down.
In the box next to it, enter the formula=D2
(This refers to the cell above the active cell!)
Click Format...
Activate the Fill tab.
Select green as fill color.
Click OK, then click OK again.
- AJS032Jan 09, 2022Copper ContributorHi Hans, I tried it but the colour was showing red, I changed the "Greater than or equal to" to "Less than or equal to" and the colours work Ok, thanks for your help