Change color of cell based on another cell color
If background color of cell A1 is red, then change background color of B1 cell into red. Is it possible?
Mac mini, null
If background color of cell A1 is red, then change background color of B1 cell into red. Is it possible?
Mac mini, null
Hi cross14,
A cell can't "read" the format in another cell.
You can do what you want with Conditional Highlighting, but what is the "condition" (contents) of A1 where you want A1 and B1 to have a red background?
Regards,
Ian.
Hi cross14,
A cell's colour fill is 'format', not 'content.' Yellowbox has already told you "A cell can't "read" the format in another cell."
Conditional highlighting, which used to be called 'conditional formatting,' depends on comparing the content of the cell to be formatted (B1 in your case) with a fixed value, or with the value contained in another cell.
What determines if cell A1 is coloured with red fill? If we know that, then we may be able to provide you with a way to use that content to create situation that will make cell B1 also have red fill applied.
So, to repeat the question, "What is the condition under which A1 will 'have a red background'?
Regards,
Barry
Hi cross14,
Please don't keep us guessing 😎.
What is the condition under which A1 will 'have a red background'?
Here is an example using Conditional Highlighting.
The condition I have used is that a cell in column A contains a value of X.
When that condition is met, the cell in A and its companion cell in B both have a red fill.
We need two extra columns (C and D) for this to work with Conditional Highlighting. You can hide columns C and D after you get this to work.
Formula in C1 =IF($A1="X",A1,"")
Fill the formula right into D1
Fill the formula down columns C and D.
The Conditional Highlighting rule applied to column A looks for a content match in the same row in column C.
The Conditional Highlighting rule applied to column B looks for a content match in the same row in column D.
If this is what you want, it is easy to create a single Conditional Highlighting rule for all cells in columns A and B.
Please reply with your overall aim.
Regards,
Ian.
A short script can change background color based on another cell's background color. But more information is needed regarding your document setup and your goals.
SG
Condition is- if A1 have background color RED then change B1's background color to RED.
Is it possible?
Change color of cell based on another cell color