I have two columns A and B
I'm trying to format A based on drop-down selection from B
I did:
"Custom formula is": =$B:$B="Waiting"
Background Color: red
Range: A:B
but it does not seems to work unless I write "Completed", in stead of having a drop-down in the B cell.
Does that mean, drop-down is not supported in this case?
https://docs.google.com/spreadsheets/d/1xWijibYk__jHku9UIi4tIjIb607wSbfDbdCj8K2-gt4
Conditional Formatting rules applied to a range work like dragging a formula, adapting relative references.
That means if you want to apply a conditional formatting on A1:A20 if column B is "Waiting" you need to use the rule =B1="Waiting",
Related
I have a sheet where we choose what people will be assigned to each job. The job assignment will be on "Sheet" (in my sample spreadsheet). I would like the list of people on the "Pick List" sheet to be highlighted a different colour for every time they are assigned in "Sheet" more than once. I would like one assignment to be green, 2 assignments to be yellow, and 3 or more assignments to be red. I have attached the sample spreadsheet where I have tried a few solutions that are not working. Any help is greatly appreciated.
Sample Spreadsheet
The easiest way to do this is with conditional formatting.
On Sheet, select A1.
Right click and select conditional formatting.
You will need three rules. They will all be custom formulas (find under format cells if).
First enter =countif(A:A,A:A)=1 in custom formula is. Apply to range should be A1:A. Set formatting style to Green. Click Done.
then click add another rule. Custom formula will be =countif(A:A,A:A)=2. Apply to same range. Formatting style to Yellow.
Add another rule =countif(A:A,A:A)>=3 for Red.
You really don't need Pick List unless you just want to validate against it. If you do want to validate, you can
right click A1.
choose Data Validation and enter your Pick List range 'Pick List'!A1:A.
Drag A1 Down in Sheet.
I want to set conditional format rules in my Google spreadsheet. For the format cell, I select "Text contains", then I type values "PA, MA, CT, NY", formatting style I choose red. When I click DONE, the columns containing these words didn't show the color. I don't want to create rules "PA', "MA", "CT"and "NY" one by one. How can I fix them? Thanks for helping.
Select the relevant range (I am assuming starts at A1) and clear any existing CF rules from it. Format, Conditional formatting..., Format cells if... Custom formula is and:
=regexmatch(A1,"PA|MA|CT|NY")
with red fill and Done.
This should format any cells that contain any of the four state abbreviations (that is, both as part of the content of a cell and as all the content of the cell). It should format PACT but being case sensitive not many.
Try using OR with custom formula like this:
=or($A2="PA",$A2="MA",$A2="CT",$A2="NY")
As Ed said, but to clarify,
Go to conditional format and select 'Custom formula'
Assuming that your values are in column A, set the range to A1:A and enter the formula =OR($A:A="PA",$A:A="MA",$A:A="CT",$A:A="NY") in the custom formula field.
If the values are not in column A then change the formula as necessary.
I'm trying to use conditional formatting to highlight the maximum value over multiple ranges. That is, find the one highest value in said ranges and highlight all instances of it. I have been able to use conditional formatting to highlight the highest number of one column, but not over multiple.
The ranges in question are: G3:G13,J3:J13,M3:M13,P3:P13,S3:S13,V3:V13
Screenshot of the spreadsheet
The versions I have tried either highlight every value in the first row, multiple values but not the highest one, or nothing at all.
An alternative is to use a MAX function and place that value in another cell (the little 4 in the bottom right corner) and use conditional formatting based on that value. However, it's not a particularly elegant solution nor have I been able to make that work properly.
I am using New Google Sheets and am familiar with custom formatting and custom formulas for doing so.
You need to use Conditional Formatting Custom Formula.
Set Apply to Range
G3:G13,J3:J13,M3:M13,P3:P13,S3:S13,V3:V13
Enter in Custom Formula is
=G3=(max($G$3:$G$13,$J$3:$J$13,$M$3:$M$13,$P$3:$P$13,$S$3:$S$13,$V$3:$V$13))
Pick your formatting style.
You may have to scroll down the Format cells if menu to find Custom Formula.
Anyway, I have a table in Google Spreadsheets that has a set of rows which each contain a name (Column A) and two Yes or No values (Columns G and H).
I would like a way to conditionally format the rows. I have been trying to learn the formatting but I feel this is well out of my league. The way I would like it all to be formatted is only in Column A. If G says "Yes" and H is empty, then yellow. If G says "Yes" and H says "No", red. If G says "Yes" and H says "Yes", green.
If it helps, here is a chart:
G H
Y -- Yellow
Y N Red
Y Y Green
An explanation of how it all works would also be much appreciated but if you only have the solution on how to do it, I will gladly take that.
METHOD 1 - Conditional Formatting Only
The easiest way to do this, using Conditional Formatting is as follows:
Select "Format >> Conditional Formatting":
These IF statements will be used color the cells Yellow, Red, and Green, respectively.
=IF(AND(G2="Yes",H2=""),"True")
=IF(AND(G2="Yes",H2="NO"),"True")
=IF(AND(G2="Yes",H2="YES"),"True")
METHOD 2 - New Column, using f(x), and Conditional Formatting
The code used to generate the text "Yellow," "Red," and "Green" is as follows (broken up in 2 lines only for easier readability):
=IF(AND(B2="Yes",C2=""), "Yellow",IF(AND(B2="Yes",C2="No"), "Red",
IF(AND(B2="Yes",C2="Yes"), "Green")))
This is a nested IF statement that will examine your "Yes"/"No"/null column cells. This statement looks for the conditions you specified and returns either "Yellow," "Red," or "Green" in a separate column.
Since your IF statement will output either "Yellow," "Red," or "Green," all you'll have to do is set your Conditional Formatting to look for these words and color the cell accordingly.
A great resource to learn more is the Google spreadsheet function list.
I've got it for you. It can be made using the conditional formatting in Google Sheet.
A Screen Shot attached
Right click your cell A, apply conditional formatting
Just apply it across your range in column A1:A500 something
and choose the "Format cells if..." and choose custom formula
(Just click Add another rule after each one so you don't have to repeat the range)
=IF(AND(G60="Yes",H60=""),"True") //Change the color to Yellow
=IF(AND(G60="Yes",H60="No"),"True") // Change the color to red
=IF(AND(G60="Yes",H60="Yes"),"True") // Change the color to green
You will have 3 rules of conditional formating
replace G60 and H60 with the starting row number
Edit ------------------ Forgot to add the explanation
The formula
IF(AND(G60="Yes",H60=""),"True")
"IF" is to check IF something is this or not. I added the "AND" so that we could put in 2 condition, since we need both conditions to be satisfied. and therefore the formula above in written form would be
IF(IF) BOTH(AND) G60 and H60 is "Yes" and "Empty" respectively, then it is True. So it will become the color I chose.
There might be another way to write the codes but this works :)
I'm trying to have a cell on Sheet A check if it's either > or < the value in a cell on Sheet B, then change its color accordingly. Under the custom formula I use: =A1>("SheetB!A1"), but it doesn't seem to work. I use the color Green for the > and the color Red for the <. Every time the rules are saved it will always display A1 on Sheet A in red.
Is the function wrong? Or is it not possible to have a Conditional Format even search across sheets?
For some reason (I confess I don't really know why) a custom formula in conditional formatting does not directly support cross-sheet references.
But cross-sheet references are supported INDIRECT-ly:
=A1>INDIRECT("SheetB!A1")
or if you want to compare A1:B10 on SheetA with A1:B10 on SheetB, then use:
=A1>INDIRECT("SheetB!A1:B10")
=A1>INDIRECT("SheetB!"&CELL("address",A1))
applied to range A1:B10.
You can do this by referencing the cell and row number in the current sheet, so as you drag-copy that conditional formatting to other rows it will reference the correct cells.
In the below equation I am coloring cells based on the exact same cell in some other sheet named "otherSheetName" in this example. If for example you want to color cell B2 in Sheet2 if the cell B2 in otherSheetName contains the text "I Like Dogs" you would go to cell Sheet2!B2 , click condition formatting, choose equation from the drop down and paste the below equation.
=IF(INDIRECT("otherSheetName!"&ADDRESS(ROW();COLUMN()))="I Like Dogs";1;0)
Comparing strings instead of numbers for a conditional formatting rule, you can use:
=EXACT(A1,(INDIRECT("Sheet2!A1")))
Case sensitive.
There is one trick/bug: if you have conditional formatting in Sheet1 that explicitly references itself (e.g., the formula is Sheet1!$C$2), you can copy the conditional formatting to Sheet2 with Paste special > conditional formatting and it will "work"... as long as you don't touch anything:
if you try to edit the conditional formatting in Sheet2, then you'll get an "Invalid formula" error.
if columns/rows change in Sheet1 such that they affect the conditional formatting (e.g., row/column inserts), this is not reflected in Sheet2 (keep in mind that the indirect trick mentioned by #AdamL will also not reflect column/row updates either, so it's a wash in this respect).
I was able to compare two sheet and highlight the differences on the second sheet using conditional formatting :
=A1<>(INDIRECT("Sheet1!"&Address(Row(),Column(),)))