In Google Sheets, how do I filter based on the value of another cell? - google-sheets

This might seem like a simple question, but I'm really struggling to get it to work. Google Sheets has 'filter by condition', so I'm hoping I can enter the condition of a cell value in order to filter on rows with only that value.
So for example, in a column called Manager, I would like to filter by condition from another tab on cell =Sheet1!A2, where this is the manager name. However, it's only pulling through rows where the cell is blank.
Does anyone know how this could work, or even if it's meant to work the way I would like?

if this is filter view not FILTER formula then you need to use INDIRECT because you refer to value on another sheet. try:
=INDIRECT("Sheet1!A2")

Related

Edit data after FILTER in Google Docs

I have FILTER some range like "=FILTER(E1:M11;E1:M1=B1)" but I use FILTER for simple access to the cell-data, that must be edit, trying to wright something in to FILTER celLs given an a formula FILTER error...
google sheets does not support editing cells where the output of the formulas rolls out. this is a feature by design, not a bug. if you wish to re-write a print from a formula that formula needs to be inserted with a script, not as an in-cell function

Why doesn't referencing another Google Sheets tab work in a Conditional Formatting formula?

I'm trying to reference a cell in a different tab in a conditional formatting formula.
For context, this is a tee sheet for a golf tournament. The Attendees tab lists the players, the TeeSheet tab is my tee sheet. Each foursome has a group number. I want even and odd numbered foursomes formatted differently on the tee sheet.
What I want for my formula is this:
=isodd(Attendees!$j2)
If I pop that into a cell on the TeeSheet tab I get a proper boolean value, so I know the formula itself is valid.
But if I try that, I get an invalid formula error.
All I can do is put the group number on the Tee Sheet using a simple "=Attendees!$J2" reference, then reference that in my conditional formatting rule (which proves that the isodd() formula can be used here):
=isodd($a2)
I really would prefer to access the group number on the Attendees tab, rather than creating an intermediate reference on the TeeSheet where it doesn't belong.
Can anyone suggest why this is happening?
In conditional formatting you cannot reference other tabs directly.
But you can do so indirectly. like this:
=isodd(INDIRECT("Attendees!J2"))
Typically, the way that you make these work for larger ranges is with an offset function. something like this:
=ISODD(OFFSET(INDIRECT("Attendees!J2"),ROW()-2,0))
If you applied that to a range in your tab, say A2:A, it would return TRUE for every row that had an odd value in column J on the tab called Attendees.

Highlight rows with unique values when compared to a different sheet

I have two sheets:
The first is the Master Sheet of responses to a survey.
The second will be an Update Sheet auto-generated from the new responses.
New responses can be either entirely new rows or edits/updates to previous entries.
I am trying to create a Conditional Formatting rule to auto-highlight any rows in the Update Sheet which do not match the corresponding rows in the Master sheet.
(A row "does not match" when it shares the same Respondent ID number as the Master sheet row but contains different information in the following cells.)
I'm also trying to make it ignore any empty cells.
I created named ranges: "Master" and "Update" on each sheet respectively.
Here's an image of what I'm trying to accomplish:
I'd like to accomplish this without scripts or using a helper column if possible.
Any help from you genuine experts out there would be greatly appreciated!
And here's the Demo Sheet for reference.
So far I have tried to use INDIRECT to accomplish the cross-sheet highlighting (below). However, that didn't work so I'm obviously doing something wrong.
CONDITIONAL FORMATTING:
- Apply to Range: A3:A200,F5:F200
- Custom Formula: =ISNA(match(A3,INDIRECT("Master!F5:AS"),0))
Update #2:
With help from #I'-'I I've been able to get closer with:
CONDITIONAL FORMATTING:
Apply to range: A3:F200
Custom Formula: =and(isna(match($A3,INDIRECT("Master!F5:F"),0)),not(isblank($a3)))
However, while it now highlights the "New Data" rows, it ignores the "Updated Data" row which has the same Respondent ID but different data in the following cells.
Any suggestions on how to rectify this would be appreciated!
Conditional formatting custom formula applied to range A3:F200:
=IF(LEN($A3),IFERROR(SUMPRODUCT(QUERY(INDIRECT("Master!F5:J"),"where F = "&$A3&" limit 1")<>$A3:$E3),1),)
HTH
Adam
With help from #I'-'I I now have the following solution, which works perfectly. :
=AND(NOT(ISBLANK($A3)),OR(IFERROR(ARRAYFORMULA(VLOOKUP($A3,INDIRECT("MASTER!F5:J"),COLUMN($A$1:$E$1),0)<>$A3:$E3),1)))
#I'-'I provided this explanation:
VLOOKUP to lookup ID(A3) in the master sheet and return the
corresponding 5 columns(5 cells).
VLOOKUP results are compared
against current row's 5 columns(<>A3:E3).
IFERROR to return TRUE if
lookup fails(suggesting NewData).
ISBLANK to ignore blank rows.
AND/OR/NOT Self explanatory. Used to combine TRUE/FALSE in a specific
way to achieve intended result.
The solution by #AdamL also works, but I don't know how to give credit to two answers at the same time.

Google Sheets - =ISURL()

In Google Sheets, I want check if a URL exists in the cell.
I do this with =ISURL(E1) which seems simple enough. I have this setup as a custom formula within Data Validation. The problem is, I want to do this for the entire column and I don't want to type =ISURL(E1), =ISURL(E2), =ISURL(E3), etc... for every single row. This rule is only applied to itself, so is there a way I can make the cell reference itself? For example =ISURL(SELF), then I can copy/paste this rule on the entire column?
I've tried the below but none work.
=ISURL()
=ISURL(E$1)
=ISURL(SELF)
Data validation has a condition Is Valid URL.
You do not need a custom formula.
Also,
=ISURL(E1)
Apply to range E1:E20
Works well for the whole range.
There's a build in function for that, you don't need to use a custom formula.
In the Data validation popup go to Criteria select Text and then is valid url.

reference cell via two partial matches on another cell

I need to match two conditions on the cell Name and add the price information into cell price if both condition match. In other words, if Name contains both conditions, get the price. I tried different approaches using QUERY, SEARCH; FIND; VLOOKUP but I got stuck somewhere in the middle. Here's the example sheet (Google Spreadsheet solution preferred over Excel):
https://docs.google.com/spreadsheets/d/1zwG3_5Ctg_IZ1kI04Uee-qIvMrNQ4GmEwySmYcMKLfA/edit?usp=sharing
Maybe important: Both, the Name values as well as the whole reference table get pulled from other files dynamically. So I don't know anything concerning order or length of these columns in advance, not even if there are matches at all.
In addition to previous answer AND given the current set of data (in a Google spreadsheet), in B2 try:
=ArrayFormula(iferror(vlookup(regexreplace(A2:A; "[^A-Z]"; ""); {E2:E&F2:F\G2:G}; 2; 0)))
and see if that works ?
Based on your spreadsheet table:
you can try the following formula:
this formula works in excel not in google spreadsheets
=IFNA(INDEX($G$2:$G$6;MATCH(1;COUNTIFS(A2;"*"&$E$2:$E$100&"*";A2;"*"&$F$2:$F$100&"*");0));"NOT FOUND")
this is an array formula, so press ctrl+shift+enter to calculate the formula.
i think it will do the job.
here is the example file to download

Resources