Conditional formatting based on a range of names - google-sheets

I'm trying to make conditional formatting that changes the color of a cell (Red, Blue, Green) based on a range of names on a different sheet. What I have is three lists of names that are either Red, Blue or Green. When I make a list with these names on a separate sheet I want the formatting to change their color to the ones assigned.
The formatting I want to make is something along the lines of "IF the value (name) in this cell is the same as the value (name) in any of cell in a range on another sheet it should change the color automatically.
Here is a link to a sheet where I tried to set it up they way I wanted it to look but I still can't get the formatting to work
https://docs.google.com/spreadsheets/d/1i1DM8X6gyRNMUmYBAtuupeuCUA1iB4LhMDwkD7PHi8w/edit?usp=share_link
I was trying the conditional formatting tool with formulas but I kept getting errors with the formulasenter image description here The picture is in Swedish because google sheets would keep defaulting back to it regardless how much I tried.

One thing is that Conditional Formatting doesn't allow you to directly refer to another sheet. You can do work it around via INDIRECT.
And to compare to several texts, you should not choose the option text contains, but you can find useful REGEXMATCH and TEXTJOIN:
=REGEXMATCH(A2;TEXTJOIN("|";1;INDIRECT("'Name sheet'!A2:A11")))
=REGEXMATCH(A2;TEXTJOIN("|";1;INDIRECT("'Name sheet'!B2:B11")))
=REGEXMATCH(A2;TEXTJOIN("|";1;INDIRECT("'Name sheet'!C2:C11")))

Related

Conditional Formatting a Range based on Text from Range on separate Sheet in Google Sheets

Populating a dynamic event calendar from a separate sheet and want the titles of each event to be bold font.
Conditional formatting works if I am comparing to a single string or cell with text, but there are multiple titles that would appear in each column.
Need to use "Text is exactly" or a custom formula, where if any of the cells in column D for example match any of the titles from column E of another sheet, make them bold.
A separate sheet can only be accessed via the "INDIRECT" function, but even when I pull the list of titles onto the same sheet, it does not work.
Have tried the built in "Text is exactly", also tried custom formulas using TEXT, EXACT, IF, etc. but can't seem to get it to work.
Tried custom formula:
=$E$8:$E$52=TEXT($E$55,$E$56) This only matches the first instance (E8 to E55)
Format range E8:E52 with this conditional formatting custom formula rule:
=match(E8, E$55:E$56, 0)
To get the titles from the other sheet, use something like this:
=match(E8, indirect("Sheet2!A2:A"), 0)

Changing cell colour if value modified in google sheets

I am working in google sheets and want the background colour of the cell to change to red if it's value has been modified. However, I want to avoid using any script for that. Is it possible to do this through conditional formatting?
If not, is there any other way to do it? (again no scripts)
this can't be done without a script because there is no way how to track down a "modified value". conditional formatting can be done based on something eg "something" stands for a fixed point in a timeline from which can change be anchored like today's date, max from range, equal to a value, etc.
Possible with Conditional Formatting provided there is a record somewhere of the cell's initial value (the reference for what constitutes a change). This need not be in the same sheet. Say that reference is a named range Tigger that represents the 'initial' value of say C6 in the sheet with the cell whose colour is to be changed.
Select C6 then Format, Conditional formatting..., Format cells if..., Custom formula is:
=$C$6<>indirect("Tigger")
choose red fill and click Done.
The colour is lost if the cell returns to the initial value (unless the content of the named range is modified to have itself been changed meanwhile).

Highlight cells a different colour for each number of occurrences of a string

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.

Conditional Formatting cells in column up to and including the last one with text entered

I am using Google Sheets and trying to write a custom formatting rule that seems like it should be simple. I am trying to figure out how to conditionally format all the cells in a column INCLUDING AND ABOVE (but not below) the cell that meets my condition.
I've found a lot of things that will format the entire column, but that's not what I'm looking for.
The image below is a basic example that I manually colored in to do what I want.
It's for my budget spreadsheet, where each row is an entry from a particular date. I have an "Agreement" column that is empty except when I enter the date that I reconciled the budget. I want it to color that cell and all the empty cells above it green, signifying at a glance: "everything up to this point is ok/has been checked over". Then as time goes by, and I enter another date several rows below, I want it to extend the colored shading up to there.
I've been searching, but it is hard to articulate this; if I say "until this cell" I get results for "shade cell until text is entered"; any mention of "above" and "below" generally relates to the values in the cells; I've found some things about Indirect but just for a single cell above, not for all cells above the current cell.
Wondering if this is even possible...
Google Sheets example
If you create a conditional formatting rule for column A using a Custom Formula you can use this formula:
=COUNTIF(ROW(),"<="&LARGE(ArrayFormula(IF(ISBLANK(A1:A100),"TRUE",ROW(A1:A100))),1))
The larger the ranges you use, the slower it will be however.

How to conditionally format highest value of multiple ranges

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.

Resources