Create an auto updating dropdown list - Google sheets - google-sheets

How can I create a dropdown list that sources the values in a different sheet but that at the same time when I put a new value into the validation cell, auto updates the values in the source sheet?
Thank you for your comments.

Solution
To be able to do something like this
First we need a pre filled list on "different sheet" and stack it with the range of values where the drop down list validation is, with this formula
=QUERY( {'source sheet'!A2:A ; A2:A }, "Select Col1 Where Col1 is not null")
Next in source sheet range A1:A selected, Click Data and then Data validation > List from a range: Choose the cells that will be included in the list, from the "different sheet" range B2:B
we should get a result like this

Related

Google Sheets - Query Table with output corresponding to specific cell criteria

I am trying to create a query based on a date range, that will display output based on the values in another column.
Here is the sample dataset I'm working with.
I would like the # Allotted (Column F) to be queried into 2 separate columns, depending on whether the Cost = 0. If the Cost = 0, I want the # Allotted to be listed under column "Free Trial" - otherwise, it should be listed under "Purchased."
I tried to create 2 separate queries for the "Purchased" and "Free Trial" columns but I can't figure out how to tell it to list the output based on a key value, such as Customer.
You can see my attempt in the sheet attached as well as what I'd like the output to look like. I highlighted the columns I'm having trouble with.
Thank you for your help!
Try:
={query(
{query({A:J},"select Col1,Col3,Col9,Col6,Col7 where Col7 =0 ",1);
query({A:J},"select Col1,Col3,Col6,Col9,Col7 where Col10 > date '"&text(A2,"yyyy-mm-dd")&"' and Col10 < date '"&text(B2,"yyyy-mm-dd")&"' and Col7>0 ",1)}
,"where Col2 is not null order by Col3,Col4 label Col1 'Customer',Col2 'Type', Col3 'Purchased', Col4 'Free Trial', Col5 'Cost'",1)}
I figured it out! Ended up using Filter instead of Query so I could filter based on the criteria selected.
I updated the solution to the sheet linked in the question.
For column "Purchased":
=iferror(FILTER(F4:F14,A4:A14=G19,J4:J14>=A$2,J4:J14<=B$2,G4:G14<>0),"")
For column "Free Trial":
=iferror(FILTER(F4:F14,A4:A14=G19,J4:J14>=A$2,J4:J14<=B$2,G4:G14=0),"")

How to text wrap some cells in a google sheet column?

I have a google sheet, wherein the first two columns are filled using "Arrayformula" from a pivot table. Is it possible to merge some of the cells in first column while using Arrayformula.
Below is an image of sample data which I am obtaining from the pivot. I would like to have "Porsche" from 1st column to be text wrapped for all its corresponding customer IDs.
https://i.stack.imgur.com/Pdt4I.png
Thank you
You can try using query to filter out rows where there are no Customer IDs.
Formula:
=arrayformula(query({A1:B}, "where Col2 is not null"))
Output:
If this isn't the one you want, kindly provide your expected result as I'm unsure with how you used the term "text wrapped"

create a string of column headers when rows of checkboxes are TRUE; using an ARRAYFORMULA

I am interested in creating a string of headers for a rows based on which columns are marked true (sample spreadsheet linked below)
The following formulas both return the desired result for Row 2:
=JOIN(", ",QUERY(TRANSPOSE($B$1:$G),"select Col1 where Col2 = TRUE",0))
=JOIN(", ",FILTER($B$1:$G$1,B2:G2=TRUE))
I am unable to successfully use an ARRAYFORMULA with either option. Both require the current row to be selected: QUERY in "where Col#" of query syntax and FILTER in the range for the condition syntax.
=ArrayFormula(IF(A2:A<>"",JOIN(", ",QUERY(TRANSPOSE($B$1:$G),"select Col1 where Col"&ROW(A2:A)&" = TRUE",0)),""))
=ArrayFormula(IF(A2:A<>"",(JOIN(", ",FILTER($B$1:$G$1,B2:G2=TRUE))),""))
The linked sheet below shows the desired result in COLUMN H & COLUMN J (these were updated individually. The ARRAYFORMULA options are in COLUMN I & COLUMN K (currently not working).
I am interested in a solution that can populate the desired results without requiring each row to be updated individually.
link directly to "headers" tab:
https://docs.google.com/spreadsheets/d/1E7EGjK-YuVBxgdX5URnzZMDOwvF6oAi7ZJxY9HmySNc/edit#gid=966778061
In H2 try
=ArrayFormula(if(len(A2:A), regexreplace(trim(transpose(query(transpose(if(B2:G, B1:G1&", ",)),,rows(A2:A)))), ",$",),))
and see if that works?

Extract Value from Cell on Another Sheet Based on List

I have a list of data on one sheet. A second sheet is used to display who's done what, like a dashboard. I've been given an array formula to generate the data that looks up the employee's name, and displays it if they are present on the list for a course completed. If so, a "yes" is listed on the dashboard under the corresponding course number. I cannot figure out what I need to change the REGEXREPLACE with to present the date column from the data list instead of "yes". I'm aware REGEXREPLACE only works for text values, and dates aren't - even changing the date column to text seems to matter not.
Here is a working example of the current array formula:
https://docs.google.com/spreadsheets/d/1jkG515zyl4UxRHxhtFTjgWsjG0aBE4vsOxbpvqgjogU/edit#gid=536376041
Here is the formula used:
=ARRAYFORMULA(IF(A5:A="",,REGEXREPLACE(IFNA(VLOOKUP(A5:A,
QUERY({TRIM('Form Responses 1'!B2:G)}, "select Col1,count(Col1) group by Col1 pivot Col6"), MATCH(F2:P2,
QUERY(QUERY({TRIM('Form Responses 1'!B2:G)}, "select Col1,count(Col1) group by Col1 pivot Col6"), "limit 0", 1), 0), 0))&"", "\d+", "yes")))
In the above example, I need the Date Completed from col D on the Form Responses sheet.
Here is a first attempt that might help you.
This is a straightforward query, that pulls the dates, and pivots to have the employee names on the left, and the course names on the top.
But it doesn't try to match up data with an existing list of employees - it just lists all of the employees that have submitted a form. So if you want to see all employees, with blank rows for those who haven't submitted a form, this won't work for you.
The formula, in A2,is:
=ARRAYFORMULA(QUERY({'Form Responses 1'!B2:G}, "select Col1,max(Col3) where Col1<>'' group by Col1 pivot Col6 order by Col1"))
See tab Sheet1-GK, added to your sample sheet.
Let me know if this helps, or if you need something different.
UPDATE:
To limit the result to a specific list of courses, use the following modification:
=ARRAYFORMULA(QUERY({'Form Responses 1'!B2:G},
"select Col1,max(Col3) where Col1<>''
and Col6 matches '" & TEXTJOIN("|",1,F2:2) & "'
group by Col1 pivot Col6 order by Col1 "))
Here, the list of desired courses to report on is in F2:2, where you had them originally, but this list could be kept anywhere, even on another tab. If you name the range where you place it, that can simplify this formula a bit. For now, you could just hide row 2. I've grouped it, on the left, to hide it. Use the [+] to reveal it again.

Function to check a range of columns for a value then populate found value into a new column

I have a table with data spreading across many columns but I want to be able to summarize the data into one column as seen in the first column School Number in the screenshot. Sample Google Sheet
paste in A2 and drag down:
=IFERROR(QUERY(TRANSPOSE(B2:2),
"where Col1 is not null limit 1", 0))

Resources