Ok, it's a bit of a head scratcher for me.
I am working on a work load spreadsheet and I need to highlight people with different colours depending on their workload so that I could see at glance who's loaded too much and who still has capacity.
Capacity number is just a number of project she or he can handle can be 3 to 5. I store this data in a separate sheet "Resources".
3 colours of load are enough
The problem I am facing is conditional formatting in GS doesn't support pulling data from a separate sheet. Id' rather keep all the raw data outride of the main Overview sheet. But if it's impossible maybe helper columns next to each group of workers would work as well
However, it's important be able to copy the whole row and paste at the end for new projects.
Plus I have difficulty to figure out how to create a formula that works for all names, rather than creating colour conditions for each single name.
Any suggestions?
Here is an example spreadsheet of table and bellow what I envision it should like. I need to be able to see in the Overview sheet at glance who's at their capacity. So as you can see Bobbie is on 6 projects, so he has to be RED. Tom is only on one project and the colour should be something like blue or green. Hope that makes sense https://docs.google.com/spreadsheets/d/12hJlsH8PndCYrrhgCoL5oUghHQMLL1bgIWomSpEfdEA/edit?usp=sharing
Okay, I think I found a way to do this. However, it needs a couple of Conditional format rules if you want to do a kind of gradian.
The good thing is that it will not require to be linked to a name. Even if you change the names, it will not affect it.
The rule will look something like this:
The one that has a capacity of up to 5 will look like this after adding the rules:
For the ones for developers, I added the 3 columns at the same time, so the formula takes the 3 columns for the capacity count.
I edited the Sheet called "Copy of Overview." I added the formatting for the C and D columns.
Reference:
Use conditional formatting rules in Google Sheets
Quick fix
Try this if you want the conditional formatting done in Resources tab.
Adjust the minpoint and maxpoint in Conditional format rules pannel accordingly
Helper table
Paste this formula anywhere to get the helper table with the count of each worker occurrence in the range C2:F
= ArrayFormula({
"Name", "Work Load";
FILTER(UNIQUE(FLATTEN(Overview!C2:F)),UNIQUE(FLATTEN(Overview!C2:F))<>"",UNIQUE(FLATTEN(Overview!C2:F))<>"-"), IF(
FILTER(UNIQUE(FLATTEN(Overview!C2:F)),UNIQUE(FLATTEN(Overview!C2:F))<>"",UNIQUE(FLATTEN(Overview!C2:F))<>"-")="",,
COUNTIF(FILTER(FLATTEN(Overview!C2:F),FLATTEN(Overview!C2:F)<>""), FILTER(UNIQUE(FLATTEN(Overview!C2:F)),UNIQUE(FLATTEN(Overview!C2:F))<>"",UNIQUE(FLATTEN(Overview!C2:F))<>"-")))})
Conditional formatting & formulas - Simple
Similar to Giselle Valladares, answer "2022-08-12 22:00:41Z"
Simple but have a Limitation: a single white space is also highlighted
Color "Formatting style"
Apply to range
Formula
Green
C2:G
=COUNTIF(C2:F,C2)=1
Blue
C2:G
=COUNTIF(C2:F,C2)=2
yellow
C2:G
=COUNTIF(C2:F,C2)=3
Red
C2:G
=COUNTIF(C2:F,C2)>=4
Conditional formatting & formulas - Complex
Try this
Color "Formatting style"
Apply to range
Formula
Green
C2:G
=ArrayFormula(REGEXMATCH(Overview!C2:G23, TEXTJOIN("|",,FILTER(FILTER(FILTER(UNIQUE(FLATTEN(Overview!C2:G)),UNIQUE(FLATTEN(Overview!C2:G))<>"",UNIQUE(FLATTEN(Overview!C2:G))<>"-"),FILTER(UNIQUE(FLATTEN(Overview!C2:G)),UNIQUE(FLATTEN(Overview!C2:G))<>"",UNIQUE(FLATTEN(Overview!C2:G))<>"-")<>""),FILTER(IF( FILTER(UNIQUE(FLATTEN(Overview!C2:G)),UNIQUE(FLATTEN(Overview!C2:G))<>"",UNIQUE(FLATTEN(Overview!C2:G))<>"-")="",, COUNTIF(FILTER(FLATTEN(Overview!C2:G),FLATTEN(Overview!C2:G)<>""), FILTER(UNIQUE(FLATTEN(Overview!C2:G)),UNIQUE(FLATTEN(Overview!C2:G))<>"",UNIQUE(FLATTEN(Overview!C2:G))<>"-"))),IF( FILTER(UNIQUE(FLATTEN(Overview!C2:G)),UNIQUE(FLATTEN(Overview!C2:G))<>"",UNIQUE(FLATTEN(Overview!C2:G))<>"-")="",, COUNTIF(FILTER(FLATTEN(Overview!C2:G),FLATTEN(Overview!C2:G)<>""), FILTER(UNIQUE(FLATTEN(Overview!C2:G)),UNIQUE(FLATTEN(Overview!C2:G))<>"",UNIQUE(FLATTEN(Overview!C2:G))<>"-")))<>"")=1))))
Blue
C2:G
=ArrayFormula(REGEXMATCH(Overview!C2:G, TEXTJOIN("|",,FILTER(FILTER(FILTER(UNIQUE(FLATTEN(Overview!C2:G)),UNIQUE(FLATTEN(Overview!C2:G))<>"",UNIQUE(FLATTEN(Overview!C2:G))<>"-"),FILTER(UNIQUE(FLATTEN(Overview!C2:G)),UNIQUE(FLATTEN(Overview!C2:G))<>"",UNIQUE(FLATTEN(Overview!C2:G))<>"-")<>""),FILTER(IF( FILTER(UNIQUE(FLATTEN(Overview!C2:G)),UNIQUE(FLATTEN(Overview!C2:G))<>"",UNIQUE(FLATTEN(Overview!C2:G))<>"-")="",, COUNTIF(FILTER(FLATTEN(Overview!C2:G),FLATTEN(Overview!C2:G)<>""), FILTER(UNIQUE(FLATTEN(Overview!C2:G)),UNIQUE(FLATTEN(Overview!C2:G))<>"",UNIQUE(FLATTEN(Overview!C2:G))<>"-"))),IF( FILTER(UNIQUE(FLATTEN(Overview!C2:G)),UNIQUE(FLATTEN(Overview!C2:G))<>"",UNIQUE(FLATTEN(Overview!C2:G))<>"-")="",, COUNTIF(FILTER(FLATTEN(Overview!C2:G),FLATTEN(Overview!C2:G)<>""), FILTER(UNIQUE(FLATTEN(Overview!C2:G)),UNIQUE(FLATTEN(Overview!C2:G))<>"",UNIQUE(FLATTEN(Overview!C2:G))<>"-")))<>"")=2))))
yellow
C2:G
=ArrayFormula(REGEXMATCH(Overview!C2:G, TEXTJOIN("|",,FILTER(FILTER(FILTER(UNIQUE(FLATTEN(Overview!C2:G)),UNIQUE(FLATTEN(Overview!C2:G))<>"",UNIQUE(FLATTEN(Overview!C2:G))<>"-"),FILTER(UNIQUE(FLATTEN(Overview!C2:G)),UNIQUE(FLATTEN(Overview!C2:G))<>"",UNIQUE(FLATTEN(Overview!C2:G))<>"-")<>""),FILTER(IF( FILTER(UNIQUE(FLATTEN(Overview!C2:G)),UNIQUE(FLATTEN(Overview!C2:G))<>"",UNIQUE(FLATTEN(Overview!C2:G))<>"-")="",, COUNTIF(FILTER(FLATTEN(Overview!C2:G),FLATTEN(Overview!C2:G)<>""), FILTER(UNIQUE(FLATTEN(Overview!C2:G)),UNIQUE(FLATTEN(Overview!C2:G))<>"",UNIQUE(FLATTEN(Overview!C2:G))<>"-"))),IF( FILTER(UNIQUE(FLATTEN(Overview!C2:G)),UNIQUE(FLATTEN(Overview!C2:G))<>"",UNIQUE(FLATTEN(Overview!C2:G))<>"-")="",, COUNTIF(FILTER(FLATTEN(Overview!C2:G),FLATTEN(Overview!C2:G)<>""), FILTER(UNIQUE(FLATTEN(Overview!C2:G)),UNIQUE(FLATTEN(Overview!C2:G))<>"",UNIQUE(FLATTEN(Overview!C2:G))<>"-")))<>"")=3))))
Red
C2:G
=ArrayFormula(REGEXMATCH(Overview!C2:G23, TEXTJOIN("|",,FILTER(FILTER(FILTER(UNIQUE(FLATTEN(Overview!C2:G)),UNIQUE(FLATTEN(Overview!C2:G))<>"",UNIQUE(FLATTEN(Overview!C2:G))<>"-"),FILTER(UNIQUE(FLATTEN(Overview!C2:G)),UNIQUE(FLATTEN(Overview!C2:G))<>"",UNIQUE(FLATTEN(Overview!C2:G))<>"-")<>""),FILTER(IF( FILTER(UNIQUE(FLATTEN(Overview!C2:G)),UNIQUE(FLATTEN(Overview!C2:G))<>"",UNIQUE(FLATTEN(Overview!C2:G))<>"-")="",, COUNTIF(FILTER(FLATTEN(Overview!C2:G),FLATTEN(Overview!C2:G)<>""), FILTER(UNIQUE(FLATTEN(Overview!C2:G)),UNIQUE(FLATTEN(Overview!C2:G))<>"",UNIQUE(FLATTEN(Overview!C2:G))<>"-"))),IF( FILTER(UNIQUE(FLATTEN(Overview!C2:G)),UNIQUE(FLATTEN(Overview!C2:G))<>"",UNIQUE(FLATTEN(Overview!C2:G))<>"-")="",, COUNTIF(FILTER(FLATTEN(Overview!C2:G),FLATTEN(Overview!C2:G)<>""), FILTER(UNIQUE(FLATTEN(Overview!C2:G)),UNIQUE(FLATTEN(Overview!C2:G))<>"",UNIQUE(FLATTEN(Overview!C2:G))<>"-")))<>"")>3))))
The problem was:
First, you applied your conditional formatting to whole columns when your first row is a header.
Second, your NB.SI formulas had the same problem as the first one but also you didn't lock your ranges with "$".
So for managers, the formula must apply to the range C2:C (not C:C) and be written like that:
=NB.SI($C$2:$C,C2)>5
The ">5" must be modified according to the colors you want.
For the Designer, you can add the function "IF" to the formula as Daniella has more capabilities like this:
=SI($G2<>"Daniella";NB.SI($G$2:$G,G2)>3,NB.SI($G$2:$G,G2)>4)
I want the right column to get a bold font whenever the left column is bigger.
For example: 0 should be bold and 59 should be bold in the right column.
Whenever I try it I add a range and then choose 'smaller than' and I choose the range of the left column it adds the complete column and compares it to the complete other column. I want them to be compared individually.
Go to
Format.
Conditional Formatting.
In the field "Apply to range" fill in the range that you want to apply these formatting rules on. For example column B:B.
select "Greater than" in the "Format cells if..." drop-down box. Fill in the "value or formula box" the 1st cell that you want to check. For example =A1.
Change the Formatting style to Bold
And you're done.
Go here for a live example, copy it to your own drive and have fun!
You need to add a custom formula. In the example below I limited the range to D13:D22 and added the green color for clarity.
Even though the formula says "apply the format if D13<C13" it works like an arrayformula and applies it to the whole range cell by cell as you need.
Select the 'right' column and apply a CF Custom formula rule to the effect:
=right column top cell < left column top cell
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.
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 :)