If background color then

Pestomania

Active Member
Joined
May 30, 2018
Messages
292
Office Version
  1. 365
Platform
  1. Windows
I want to say the following:

If background color of cell = RGB (255, 102, 255) then
Remove Conditional Formatting
Else
End if
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Something like
VBA Code:
If ActiveCell.Interior.Color = RGB(255, 102, 255) Then
   ActiveCell.FormatConditions.Delete
End If
 
Upvote 0
Solution
Is there a way to autorun it when the background of a cell changes?
 
Upvote 0
Fraid not, there is no in-built way of detecting if the colour of a cell has changed.
 
Upvote 0
Hmm okay, that's unfortunate. Can it detect if a cell value has changed?
 
Upvote 0
Yes that's possible as long as the cell is changed manually.
What are you trying to do?
 
Upvote 0
It can run that at any time a cell is changed, check if the background color of the cell is "pink" and then keep it pink.
 
Upvote 0
Are you trying to override the CF if the cell is manually changed to pink?
 
Upvote 0
Yes. If the cell is manually changed to pink, that should be the priority CF.
 
Upvote 0
In that case it is possible to detect the colour change.
Create a defined name (I called it IsColoured) & in the refers to put
Excel Formula:
=GET.CELL(63,INDIRECT("rc",0))
Then you can use that in you CF rule like
+Fluff 1.xlsm
GHI
2SU963450SurreyWaverley
3SX927937DevonExeter
4TQ316063East SussexBrighton and Hove
5TQ1841135Horsham
6SU357218HampshireTest Valley
7SU804602123Hart
8ST775646123Bath and North East Somerset
9TQ138759Greater LondonHounslow
10TQ30177922Lambeth
11ST630812GloucestershireSouth Gloucestershire
12TQ182849Greater LondonBrent
13TQ349861Greater LondonHackney
14SU152855WiltshireSwindon
15TQ318889Greater LondonHaringey
16TQ380916Greater LondonWaltham Forest
17TQ077951HertfordshireThree Rivers
18TL329130HertfordshireEast Hertfordshire
19TL588669CambridgeshireEast Cambridgeshire
Main
Cells with Conditional Formatting
CellConditionCell FormatStop If True
H2:H32Expression=AND(IsColoured<>38,ISNUMBER(H2))textNO
 
Upvote 0

Forum statistics

Threads
1,214,919
Messages
6,122,260
Members
449,075
Latest member
staticfluids

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