I want to figure out names which are not in two tabs - google-sheets

I know the caption is little confusing one. as me too struggling to point you out what I exactly need, in the limitation of my English am trying to express what I want. I have a sheet in which there are three tabs
Stock (where all the entries must be there)
Input (Where we input the names it must go to OUTPUT automatically)
Output (must display only the names which are not in stock)
instruction
Assume that Stock tab contains several names, and when the next time we paste names into INPUT tab the names which already in stock tab must go red, and the names which are not red must go to OUTPUT tab.
Hope its clear, still in the shared sheet there is 3 columns as eg.
https://docs.google.com/spreadsheets/d/1Zr0SyktYteQoOrRbWiNFqG_HWznone4Le32olFTZGv8/edit#gid=0

Solution:
The red marks can be done with conditional formatting with a custom formula. You can set it by selecting the needed range and selecting Format -> Conditional Formatting
=VLOOKUP(INDIRECT("Input!D6:D"),INDIRECT("Stock!D6:E"),1,FALSE)<>""
And we can use this VLOOKUP as basis for the second formula in the Output sheet:
=ARRAYFORMULA(QUERY(IF(IFERROR(VLOOKUP(Input!D6:D,Stock!D6:E,1,FALSE))="",Input!D6:E,""),"select * where Col1 <> ''",0))
References:
Conditional Formatting from Another Sheet
VLOOKUP()
QUERY()

Related

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.

Sumifs match ANY from one column

So I have two sheets. Neither need to be pretty. One is the basic entry sheet where data should be pulled from and looks a bit like this.
There's colours in column A, random fruit in column B and the value of what those two together would be in any given situation in Column C. That's all entirely manual and based on whatever I need when I'm inputting. The idea behind it is that nothing is entirely unique. You can see Apples can be on the same row as Red or Green, similarly nearly everything on this list is next to the word Red.
The trouble I run into is on the calculating sheet.
Column A is now made up of SOME colours from the Entry Sheet. This is a dynamic list that can change depending on other inputs so the number of rows won't always be the same.
Column B successfully uses UNIQUE, FILTER, and IFERROR to search Column B on the Entry Sheet, and return all the different values where the value in the A column on the Entry sheet appears SOMEWHERE in the A column on the Calculate sheet. I can go ahead and add a "Green Frog" to my entry sheet but he won't show up here. For those curious the formula here is:
=unique(FILTER(Entry!B:B,iferror(match(Entry!A:A,A:A,0))))
So far so swell.
Now I want to add them. I've ended up, because many hours on google took me there, using some kind of SUMIFS but it's producing the result pictured. The actual formula in C1 is
=SUMIFS(Entry!C:C,Entry!A:A,A:A,Entry!B:B,B1)
The result in C1 is exactly what I want. 5 is indeed the number of Red Apples and does not include the number of Green apples.
However, the same formula doesn't produce the desired result for the rest of the column. All other returns are '0' because the word 'Red' in the A column is only on the top row and obviously 'Yellow' is also not on the same row as 'Grape'.
So the question is, how to I get the 'Entry!A:A,A:A' to essentially make that particular criteria say "See these? Yes ALL of these please"
try:
=SUM(FILTER(C:C; B:B=F1; REGEXMATCH(A:A; TEXTJOIN("|"; 1; E:E))))

Importrange but only include certain values

I would like to create a new sheet from Google Form data which only imports cell data that matches specific criteria. Respondents have five response options for a number of questions (all questions have the same five options). I want the new sheet to only show the data in the cells that fit my criteria and the cells that don't, should be blank. I would like all rows and column formatting to remain the same.
I've got the import range part down, but I don't know should I use query, filter, if, or some other function?
Within the same spreadsheet, QUERY works well. You could also use QUERY(IMPORTRANGE( or just IMPORTRANGE if you want it to go to a different spreadsheet.
As Rubén said, if you want to maintain all the formatting, without manually doing it yourself on the destination sheet, you'll need to use script.
Query Reference
EDIT
See Sheet3 HERE. Make a copy to edit.
Any cell with a blue background has a formula. The main one is below.
=ARRAYFORMULA(IF('Form Responses 1'!D3:DD="","",SWITCH('Form Responses 1'!D3:DD,$D$1,"",$E$1,"",'Form Responses 1'!D3:DD)))
You will not be able to edit those columns. If you need to edit (like the "Comments/Adaptations" columns, you could modify the formula above and apply it column by column.
If that works, please click the green check mark to accept the answer!
Beside the number format, any formula keeps the format of the source range, so if your the format includes fonts styles, bold, italics, colors, etc., instead of a formula you should use a script.

How to highlight duplicate values in a sheet that appears in another sheet

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.

Format cells based on current value and another one

Sheet regarding this question.
I have a set of sheets where each person must use a drop down box to select a house they would like to view. We can easily add a house to the list by inserting the address, and a URL into the "houses" sheet and it will be shown in the dropdown list and the results table.
Everything works so far, but if a house becomes unavailable, I want to mark it unavailable on the "houses" sheet, and then all occurrences of that specific house in the dropdown cells and results section should have a red background.
I could use conditional formatting, but this would require me to apply a different formula to each cell and that wouldn't be practical.
I regret not elegant but I think your layout is not well suited to Google Sheets' strengths. The best I can suggest is in say J2 of sheet Choices:
=vlookup(B2,Houses!$A:$C,3,0)
copied down to J30 and J2:J9 copied across to ColumnN. Then select Choices ColumnsB:F and Format - Conditional formatting..., Custom formula is and:
=J1="No"
with formatting of red background Done.
You might want to hide columns J:N.
You should just use conditional formatting.
Step 1: Select Cell B2, go to conditional formatting and create a new rule, "Use a formula to determine which cells to format".
Step 2: Use the following formula:
=VLOOKUP(B2,Houses!$A$3:$C$42,3,FALSE)="No"
Note: This B2 value since it isn't using $, moves dynamically depending on what cells your formula is applied to. The VLOOKUP looks up the B2 value in the depicted range and returns the 'Available' column (column 3 on the Houses sheet). We're matching on "No" specifically, I believe its case sensitive so watch out for that caveat.
Step 3: Set your format to Red.
Step 4: Make sure your 'Applies to' box is pointed to the following range:
=$B$2:$F$9
Personally I hate hard coded ranges like these, you should look into dynamic named ranges. That way you can just reference a named range instead of the A3:C42 range for both your Data Validation dropdown as well as these formulas.

Resources