Google Sheets Conditional formatting based on multiple conditions - google-sheets

I had 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 and the dates are between two ranges I want it
highlighted. Then I will have multiple rules that vary in dates and
words.
This is the last formula I tried.
=AND($B2="DTC",$E2>="10/1/2017",$E2<="10/6/2018")

If you enconclose dates between quotations marks they will be treated as strings, not as dates. Used DATE(year,month,day) instead.

Related

Vlookup with multiple ranges in conditional formatting

I'm looking to validate 2 numbers with conditional formatting.
I need to resolve how to vlookup "x" value within at least 3 different ranges in a different sheet (Validation) but on the same spreadsheet.
I came out with this but it not working as intended.
May you please provide me a workaround or another solution?
VLOOKUP(F5,INDIRECT("{INDIRECT("Validation!B17:Q19"); INDIRECT("Validation!B54:Q56");INDIRECT("Validation!B91:Q93")}"),2,FALSE)
Since you plan to use it as a conditional formatting formula, here's one workaround that you may use.
1st, Create a Helper sheet which will contain the combined range of data that you will use in your vlookup(). You can just hide your Helper sheet if you want.
2nd, Use indirect() using the range in your Helper sheet.
Sample Conditional Formatting Formula:
=D1=Vlookup($A$1,Indirect("Helper!A1:B"),2,false)
Output:

How to match format of matching value? *Google Sheets

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

Compare data google sheets

I am using google sheets and I want to compare the quantity of interactions o a given person in a period of time.
My problem is that between one week and another, the people can change, some people can have no interactions and is not reported and I can have new people.
So I need a formula that allow me to compare the previous period of time but also the name.
I am trying this in order to follow up how the people's behavior is changing.
This is the example spreadsheet.
Thanks
This is an easy, quick-and-dirty solution using vlookup.
There are two variations. One using a single criteria and one using multiple criteria. infoinspired.com has a good article on How to Use VLOOKUP with Multiple Criteria in Google Sheets.
Single Criteria: This is the formula.
=iferror(vlookup((B2+1)&C2,$A$2:$D$9,4,false),"error")
This involves a cheat by creating a new column A which contains the concatenation of the date and name values for each row. This is a unique value.
The lookup criteria is the (date (B2) plus 1=the next day) and the name.
The lookup range is self-explanatory and the value returned is the Quantity (from column 4).
The vlookup formula is inside an iferror() so that any problems are highlighted.
Multiple Criteria: This uses an array formula.
=ArrayFormula(iferror(vlookup((B2+1)&C2, {B2:B&C2:C, D2:D}, 2, 0 ), "error"))
The vlookup component is very similar to the "simple" formula. The difference is that each criteria 1:(Date plus 1) and 2:Name are recognised separately, and assigned discrete lookup columns (B and C respectively).
Again, the whole thing is wrapped in an iferror statement to highlight any problems.
This spreadsheet shows the workings:

Google Sheets Custom conditional formatting multiple conditions

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")

Filter one sheet by a range in another sheet

I have a Google Spreadsheet document that I'm using to maintain a reference of all business logic on various systems. It is comprised of 2 sheets:
Sheet1 is a view of all of the logic. Each row has a unique code column (column B) and many details about the logic being done in other columns
Sheet2 is a mapping of the systems to the logic. Each system is on one row. From column E onward, each cell is exactly a code from Sheet1
The relationship between code and system is many to many, so the same code may be used by many systems, and each system may have many codes.
I would like to be able to filter Sheet1 based on whether the code column in each row is found for particular systems.
Example
System A and System B are in Sheet2 rows 50 and 51
Their codes are from column E to K
Filter Sheet1 by code where code is contained in Sheet2!E50:K51. The end result should be Sheet1 shows only those codes (and of course all columns for them)
I have seen and tried a bit of the usual suspects (ARRAY_FORMULA, INDEX, LOOKUP) but I do not yet grok them fully. I thought the answer would be going to "Filter -> By Condition -> Custom Formula is" but I'm not sure what to put there.
Any help is greatly appreciated!
Short Answer
In custom formulas of filters use INDIRECT to refer to ranges in another sheet.
To test if a value is in a 2D range, compare the value and the range, coerce booleans to numbers and sum them.
Explanation
Part 1: Custom Formulas in filters
Custom formulas in filters and conditional formatting rules can only reference the same sheet, using standard notation (='sheetname'!cell). To reference another sheet in the formula, use the INDIRECT function.
Example
Assuming that the filter criteria are in A2:A3, the filter custom formula in in a sheet called Sheet1 is:
=ISNUMBER(MATCH(A2,INDIRECT("Sheet2!$A$2:$A$3"),0))
Part 2: Test if a value is included in a 2D array
LOOKUP only could look for values in a single column or single row, by the other hand AND and OR functions can't be used in array formulas so, instead of use them we will compare a scalar value with the 2D range. This will return a 2D array of TRUE/FALSE values that we will coerce to number (1 for TRUE, 0 for FALSE) and sum them.
The final custom formula is the following one:
=ArrayFormula(SUM(N(A2=INDIRECT("Sheet2!E50:K51"))))
References
Filter your data
Apply conditional formatting rules

Resources