How to match format of matching value? *Google Sheets
https://i.stack.imgur.com/xeZmS.png
If I understand your question, I think I have an answer for you. See sample sheet here:
https://docs.google.com/spreadsheets/d/1QhED3qsoUiX0Km8R86Rg6kHdKdjwQW0uhHZeOd40Sy4/edit?usp=sharing
Note that this currently requires one formula for each of your due date columns, but these are easily dragged across, from D10, for as many columns as you need. There may be a way to combine them as one, but I haven't figured that out yet.
This conditional formatting rule's formula is applied to include D10:D and across as many columns as you need - D10:I18 in this sample sheet.
=arrayformula(index($A$2:$C$18,match(D$9&D10,$A$2:$A$18&$B$2:$B$18,0),3))
which combines the date and the item name, finds them in the initial data, and sees whether the Paid checkbox is ticked. If yes, it formats the text as "strikethrough". For clarity, I've also formatted the cell to gray, but this is easily removed, in the formatting options for that conditional formatting rule.
REFERENCE:
INDEX
ARRAYFORMULA
Conditional Formatting rules
Related
I've tried searching low, high, and deep within the crevices of the internet to find a possible solution to this, but have had no luck. My main goal is to highlight individual cells based on a couple criteria. I have a google sheet that tracks jobs based on input from employees. My conditions are:
Date must be before today
Cell must be empty (no input from that day)
Only the cell that is empty should be highlighted
https://docs.google.com/spreadsheets/d/10W9O55QQ31acOj5SyKcE0CXx8S78MZQtY-sRaIKgB7c/edit?usp=sharing
The goal of this is to make cells that did not receive any data stand out. The current formula I have is
=AND(ARRAYFORMULA(ISBLANK($B3:$D3)), ARRAYFORMULA(ISBLANK($I3:$K3)), $A3<TODAY())
But this is only highlighting the entire row, and when a cell in that row is filled, it no longer highlights that row. The yellow row is today's date. Any help in solving this is greatly appreciated!
It's not 100% clear what should be happening with the merged Column E:H. But from the limited data and assigned colors I see in your sheet, try swapping out your current "pink" custom CF rule with this one:
=AND($A3<TODAY(), OR(AND(COLUMN(B3)<=4, B3=""), AND(COLUMN(B3)>=9, B3=""), AND(COLUMN(B3)>4, COLUMN(B3)<9, OR(B3<>"", JOIN("",$B3:$K3)=""))))
You need to set a conditional format rule for each column
I believe here are the conditional format rules you need:
Apply To Range
Formula
A3:A
=AND(OR(ARRAYFORMULA(ISBLANK($B3:$D3)), ARRAYFORMULA(ISBLANK($I3:$K3))), $A3<TODAY()) *Note the OR
B3:B
=AND($A3<TODAY(), ISBLANK($B3))
C3:C
=AND($C3<TODAY(), ISBLANK($C3))
D3:D
=AND($D3<TODAY(), ISBLANK($D3))
I3:I
=AND($I3<TODAY(), ISBLANK($I3))
J3:J
=AND($J3<TODAY(), ISBLANK($J3))
K3:K
=AND($K3<TODAY(), ISBLANK($K3))
The key concept here is that within one rule you cannot specify specific ranges to apply the rule to. Part of the definition of the rule is the range that it applies to. You can have rules that take precedence over certain ranges, but you cannot have two ranges in one rule. You can test many ranges in one rule, but the formatting applies to the whole range the rule is applied to.
Make sure you have deleted previous rules before applying these to make sure they don't take precedence
Reference
Conditional Formatting
I'm using conditional formatting in a google sheet.
I can apply this format to a specific column without issue.
But if I want to have the same format on all columns with each column being independent of the other, I don't know what range I should use.
When I set a range that takes applies it to all the columns, the conditional formatting is checking the content of all the cells across all the columns instead of checking the all the cells of each column separately.
I don't know if it's clear, basically, I want to each column formatted separately.
Since I'm using app script to generate the data in my sheet, I used the conditionalFormatRule builder object : https://developers.google.com/apps-script/reference/spreadsheet/conditional-format-rule-builder
It works like a charm.
But indeed, if I were to manually input data in the sheet, I would have to manually set the conditional formatting on each column... which is completely crazy.
Thank you anyway player0 !
In that case, you need to set up conditional formatting per each column separately (manually). So for columns A-Z you will have in total 26 conditional formatting rules in your spreadsheet per your sheet.
Good Day
I am wondering what custom formula i should use in condition formatting to highlight a cell when it doesn't include a "part name" i have in a list on sheet2
I want Cell A4:A1000 to turn orange when the text in the cell next to it "is not" on a list in Sheet 2 A2:A100
let me know what additional information you need... sorry
Im currently stuck with something like this....:
F4=indirect('Auto Fill'!A2:A343)
but i need it to not be on the list... which is something that's missing from this formula as well... so maybe:
F4= ISNOT indirect('Autofill'!A2:A343)
This is the inverse of your request - I'll leave it as an exercise to the reader how one would get the opposite.
Basically, you want check if the value of some cell is in the list of valid values. If you were computing this as a sheet value, you would use =COUNTIF. For conditional formatting, the same applies:
=COUNTIF({LOOKUP_RANGE_ABS_REF}, {VAL_TO_CHECK})
=COUNTIF($D$2:$D, B2)
Here's the formula in action:
Note that T-3000 and wheels are not in the "Part List" column, and thus do not match.
Comparing to different worksheet within same workbook
If the data to be compared against is not in the same worksheet, the range reference {LOOKUP_RANGE_ABS_REF} must be wrapped in a call to INDIRECT(), i.e.
=COUNTIF(INDIRECT("{OTHER_WORKSHEET_NAME}!{LOOKUP_RANGE_ABS_REF}"), {VAL_TO_CHECK})
=COUNTIF(INDIRECT("some sheet name!$A$2:$A"), B2)
As per official documentation,
Formulas can only reference the same sheet, using standard notation "(='sheetname'!cell)." To reference another sheet in the formula, use the INDIRECT function.
This is also noted in several other SO questions (albeit using different core formulas besides COUNTIF):
https://stackoverflow.com/a/25753889
https://stackoverflow.com/a/28910087
https://stackoverflow.com/a/36684815
https://stackoverflow.com/a/37634170
(I'm sure there are more.)
Missing from those answers is the caveat that the indirection you've just added is not robust to changes to the value of {OTHER_WORKSHEET_NAME}, e.g. you (or some other editor) changed the actual name of the worksheet.
Unlike traditional entered-on-the-worksheet formulas, there is no "run-time" reference link that will update the static text value you had to enter when you created the Conditional Format rule. This lack of reference-updating is actually one of the useful features of INDIRECT(), so don't expect it to ever change.
Furhtermore, the reference break will not be immediately evident. Any items that were added to your formatted range after the name change had their format computed using the broken reference, but any items added before the name changed will keep their current format. Only when the actual range that is wrapped by INDIRECT is edited will any pre-existing conditional formats be recomputed. Thus, you may not notice that the sheet was renamed until you add a new valid part to the list.
Quick kludge, import what you need (I gave it the name List) from sheet2 (you'll have to grant permission), Select ColumnA and apply a CF formula rule of:
=and(A1<>"",iserror(match(B1,IMPORTRANGE(" k e y ","List"),0)))
I know how to apply conditional formatting if there are duplicate values in a column and I know how to use a formula to that references values from multiple sheets; however, what I want to do is apply formatting to a value if it is a duplicate in another sheet.
Example: I have sheets "friendlies", "healthcare", "IT" and "marketing" that contain names and contact information. Email addresses are always in column E.
Occasionally someone gets moved from a vertical, healthcare for instance, into the friendlies sheet.
When someone gets added to the friendlies worksheet, I want their email cell (in column E) in the friendlies sheet to turn red to remind me to remove them from the healthcare sheet.
Is it possible create a formula that looks to another sheet for a duplicate? I tried the below with no luck:
=countif(Healthcare!E:E,E1)>1, as well as =countif(Healthcare!E:Healthcare!E,E1)>1 and then finally =countif(Healthcare!E:Healthcare!E,Healthcare!E1)>1
Does anyone have any insights to help?
Presumably in connection with security, conditional formatting across sheets can be a bit of a rigmarole but the CF formula rule is very simple if you are prepared to make use of a helper column.
Taking a similar approach to what you tried, the helper column, say F should be populated with, in say F1, and copied down to suit:
=countif(healthcare!E:E,E1)+countif(IT!E:E,E1)+countif(marketing!E:E,E1)
Then it is just a matter of selecting ColumnE in friendlies and Format - Conditional formatting..., Custom formula is and:
=F1>0
with selecting red formatting of choice and Done.
An alternative to a helper column is to apply named ranges and INDIRECT:
=countif(indirect("hMail"),E1)+countif(indirect("imail"),E1)+countif(indirect("mMail"),E1)
hMail for example the name for ColumnE in healthcare.
I made a spreadsheet in google sheets in my last company which highlighted all my rows based on my qualifying conditions. I can't remember what conditional formatting I used.
I have tried the =IFAND and =AND functions along with others.
This is what I am trying to do:
If column B says DTC, even if something else is also in cell, and the dates are between two ranges I want it highlighted. Then I will have multiple rules that vary in dates and words. I have attached a new demo sheet to help.
https://docs.google.com/spreadsheets/d/1yX_Ohfdz0uRKvOB8hvOpcO2sb5dSaAP6Zw-aR_HzK2E/edit?usp=sharing
The formula I have in there now is =AND($B2="DTC",E$2>=DATE(2017,10,1),E$2<=DATE(2018,10,1))
To find both DTC and DTC-DCL with a wildcard try using if with search like this:
=if(and(search("DTC*",$B2),$E2>=date(2017,10,1),$E2<=date(2018,10,1)),"true","false")