I have data validation set up in my sheet so that Sheet1 cells can accept one of the values from Sheet2 list.
Since Sheet2 has 2 columns, I would like to make conditional formatting so that if an item from column A is selected that I show one color, and if an item from column B is selected that I can show another one.
I have tried setting to format if
Text contains =JOIN(", ",INDIRECT("Sheet2!C2:C"))
As well as
Text contains =INDIRECT("Sheet2!C2:C")
But none of these work.
Can I do this somehow?
EDIT
Also tried to do
Custom formula =ArrayFormula(sum(countif(B2:I26, Studenti!B2:B)))>0
Which does seem to do its work on its own, but inside format rule doesn't
green color:
=FILTER(A1,COUNTIF(INDIRECT("Sheet2!C1:C"),A1))
red color:
=FILTER(A1,COUNTIF(INDIRECT("Sheet2!D1:D"),A1))
Related
I want to block certain users/groups from viewing formulas in certain cells in Google sheet, but they'll have permission to edit other cells values. All they will be able to see is the result.
explanation: it's an advanced calculator. let's say that I want to give the user the ability to put values in cells A1 and B1, and in C1 the formula is =A1+B1.
I want to hide the formula in C1, so the user will only the the result.
There's a few ways to do it depending on how/who is working on the sheet. If people aren't familiar with sheets you can actually hide the formula in a row at the top by using array formulas so in the header:
={" header title" ; arrayformula(a2:a+b2:b)}
The formula would be hidden in the cell that shows the header, all the cells below would just be the calculation. If you hide the row that has the arrayformula and protect it no one will be able to see it. The only thing is you have to also protect the column otherwise if someone hardcodes a value in the column the formula will stop working.
The second option (easier but can run into more issues is the have a 'mirror' copy of the sheet they are interacting with in the same file as a hidden sheet. Basically a duplicate of the tab with all the cells a direct reference of the first tab. So:
Sheet1 = tab they interact with
Sheet2 = 'mirror' tab with every cell being ='Sheet1'!a1, but for the corresponding cell value.
As they edit Sheet the values entered in Sheet1 will show up in Sheet2, then the calculations can happen on that sheet, and then Sheet1, can just be a direct reference to that column in Sheet2. So the calculations in Sheet1 will only appear ='Sheet2'!C2. If you protect Sheet2 and hide it no one will be able to see the formulas. Sheet1 could even reference Sheet2 with an index formula like: index(column sheet2,,) which would return the entire column from sheet2.
I am having some issues with specifying a dynamic cell range for a "data validation".
I'm aware you can do some tricky stuff with = "Projections!M4:M"&O2. You can update the content of cell O2 for example to 3 and the output would be Projections!M4:M3.
This makes the value "dynamic". These tricks don't seem to work in the "Cell Range:" input field in the Data Validation selection/configuration screen.
My problem is, I hate seeing drop down arrows (call me o.c.d) for rows that have no content, my number of rows will grow in the future so I don't have any other option than selecting M4:Mfills the whole 1002 rows with drop down arrows.
Has anyone worked out a trick to make dropdown arrows only show up for rows that are filled?
I'm using = COUNTA(B4:B)to get the number of rows that are filled and = "Projections!M4:M"&O2 to make the desired Projections!M4:MX string but the "Cell Range" input field in the Data validation screen doesn't accept this as valid either.
Well I didn't find a direct solution, but something that I can work with to resolve my issue which was I hate seeing drop down arrows for empty rows.
I turned a filter on for a column that will always be filled in and filtered by conditions Cell is not empty but i'd prefer a better solution.
I am trying to create a Google Form like this one with one drop-down list and two text fields(for now! If I get this down I would like to add drop downs instead of text fields).
Now I have manually added options in the drop down here.
Form
What I want is:
The drop down to dynamically pick values from a column called 'ID' in a Google Spreadsheet.
Sheet
Auto-populate the corresponding values from Vertical and Project from the sheet to the text fields in the form.
How can I go about doing these?
I have a question about making a label by using dropdown list getting multiple column data from other sheet to the specific cell.
my sample file is here
From the "How to" file I have two sheets, sheet 1 is for making dropdown list to get data from sheet2. but i only make dropdown list from data from sheet2!A2:A (dont know how to get all data from multiple columns).What i want is all data from the row of Code (that i select from dropdown list) to show in the specific cell in the box next to it.
Could you please suggest me what formula will work on this case, or what function I should to try. Thanks in advance.
Shawn Penn
In Google Sheets, a cell using a data validated range consisting of hyperlinks will only display the link text and is not an actual link.
Example, I have a google spreadsheet consisting of 2 sheets. Sheet 1 has a cell with data validation getting it's values from a range on sheet 2, like so Sheet2!B2:B50
Sheet 2 cell B2 contains a hyperlink like this:
=hyperlink("https://docs.google.com", "LINK TEXT")
When you select that item back in Sheet 1 in the validated cell, the cell only displays LINK TEXT and is not a hyperlink.
Is there a way to use hyperlinks in a data validated range?
I think, there's still no direct way to do this since you'd asked the question. But it's possible in two ways:
make OnEdit script and replace selected text with
corresponding link
make 2 separate columns and emulate choise.
I want to suggest the second way as it's easier to implement.
The result will look like this:
Here's the link to my test file.
Step 1. Prepare data
So Sheet2 contains data, it should look like this:
Separate:
links in column B
and their labels in column A.
Step 2. Make Data Validation
Go to Sheet1. And in required range make the new rule for Data Validation. In our sample it's column A. So select range > Go to Data > Validation... > select range Sheet2!A2:A100 from your data sheet.
Note that in Google Sheets you may use bigger range for validation, sheets would ignore blanks.
Also there's a good reason to make the result of selection invisible. To make it, select custom number format and use this text:
;;;
Step 2. Make Hyperlinks with formula
In Sheet1, cell B2 paste the formula:
=ArrayFormula(if(A2:A<>"",HYPERLINK(VLOOKUP(A2:A,Sheet2!A:B,2,0),A2:A),""))
It will expand automatically.
That's all!