I am trying to create a pixel art activity where a specific number in a cell will turn a different cell a colour if the correct answer/ number is input.
For example if cell C2 has the correct answer of 7 then cells E1,F2, and G3 would turn Red.
Then if cell 2 has the correct answer of 22 cells F1,G2, and E3 would turn blue. But any other number would not change the colour of those cells.
try like this with custom formula:
=$C$2=7
welcome to stackoverflow.
For example in cell C2 apply this rule
Format cells if: 'Custom Formula is' (dropdown)
= E1 = 7
now C2 should get formatting when E1 equals 7.
Note that for strings you will need to use double quotes, like this:
= G2 = "k"
Finally, if multiple cells need the same rule, you can click the squares icon in the 'Apply to range' input field, and then you can hold 'control' and click multiple fields.
Related
I want to change format of cell A1 colored green , depends on the value in cells (A2:A5) if all cells value is "Done" , I want to color A1 Green.
Approach:
Now you are checking only the cell A2. You should check all the column range.
Your idea is to make your header green when all the cells contain the word "Done". You can translate this idea to: I have exactly 0 cells that don't contain the word "Done". This way you won't have to keep track of how many cells are in your column.
You can count how many values respect a criterion using the function COUNTIF.
Formula:
=COUNTIF(A2:A5, "<>Done") = 0
I want one cell that's blank to change colors based off another cell containing text. But once the blank cell has a text put in I want the color to go away. I have not tried anything because I'm unsure how to code this.
So if
A1(contains text),B1(blank cell) turns red. Once B1(contains text), B1 turns white.
I only want B1 to turn red if A1(contains text).If A1(is blank) I want B1 to stay white.
Format -> Conditional Formatting -> Apply to Range B:B
Custom Formula is =and(A:A<>"",B:B="")
if column A has a length greater than 0 and column B has a length equal to 0 make column B red.
So I want the following conditions to be achieved based on the value of an external cell:
If the text in the external cell coincides with the one in the selected cell, the selected cell turns green. [DONE with Format Rule: Is equal to =externalCell]
If the text in the external cell does not coincide with the one in the selected cell, the selected cell turns red. [DONE with Format Rule: Is not equal to =externalCell]
If there is no text in the external cell, the selected cell turns white. [PENDING]
Please see the screenshot in the link for a better understanding, where you can see my conditional format rules.
In this case, selected cell J10 is green because coincides with external cell T10. It would be red in any other case, but don't know how to supply the third condition.
EDIT: Let's explain it with an example. What I want to do is that:
(A1 will always have text)
A1 turns colour white when B1 HAS NO text in it.
A1 turns colour green when B1 HAS text in it and the text in both cells match.
A1 turns colour red when B1 HAS text in it and the text in both cells DO NOT match.
(A1 will always have text)
A1 turns colour white when B1 HAS NO text in it.
A1 turns colour green when B1 HAS text in it and the text in both cells match.
A1 turns colour red when B1 HAS text in it and the text in both cells DO NOT match.
try it like this:
I'm trying to get a cell to highlight with a certain color if the text of two other cells match. Has anyone else done this?
Example:
If the value in the cell A2 is "Car" and the value "Car" is in a range on another sheet, can the cell B2 be filled with a color?
Assuming a range on another sheet is ColumnC of Sheet2, then select B2, apply the Conditional Formatting custom formula:
=match(A2,indirect("Sheet2!C:C"),0)
and certain colour fill.
This can be achieved using conditional formatting.
Select the cell (B2 in your example) and in the menu bar go to Format > Conditional Formatting...
Here you want to use a custom formula. Specifically for your example, the formula to input would be:
=AND(A2="Car",COUNTIF(C2:C5,"Car")>0)
Note that the range that is being checked for "Car" is C2:C5, since you didn't specify any for your example.
EDIT:
Following the discussion in the comments:
=COUNTIF(Sheet2!$C:$C,A2)>0
What this does, is that it looks for the value in A2 in column C in Sheet2 and if it occurs once or more, the cell that you have applied this conditional formatting to, will be coloured.
I would like to format cell D2 based on text in C2. I would like D2 to be colored Red if C2 contains text from a drop down of "No" and be colored Green if the text is "Yes". I have tried custom formula containing =IF C2 ("Yes") which Google Sheets seems to accept but he result is not displayed at all.
Select D2 (or D2:D9 or D2:<somewhere further down>)
Choose Format ► Conditional Formatting
Format cells if... Custom formula is... =C2="yes"
Formatting style - choose a green Fill and click Done.
Add new rule then repeat from step 3 with `=C2="no" and a red Fill.
Edit: Actually, if the cell is to have a background of white for anything other than "Yes", then you only need one rule: =C2="Yes" That is, if the default background for the entire sheet is white.
You must add two separate rules to cell D2, one for each color. The formula must look like this:
=$C$2="Yes"
And for anything other than "Yes"
=$C$2<>"Yes"