Using Google Sheets to create lists - google-sheets

Let's see if I can explain this in a comprehensible manner:
To make the administration around certain field days easier, I want to make a spreadsheet where class teachers can put in the names of their students. Next to the student's name, there will be a drop-down menu (I seem to have figured that one out).
The next thing I want is for Google Sheets to take those names and sort them into lists. So, all the students who chose "softball" will end up in list, and the ones who chose "golf" ends up on another, and so on.
How do I do this?

https://docs.google.com/spreadsheets/d/1IzoVMk78s9ZUSDflN1Q0Dv2US3zBVeHaFjaL7Z__M1A/edit?usp=sharing
Check out this sheet, it should have your answers.
I have used data validation for the dropdowns and then transposed that into headers, with the FILTER formula to find matches.

Related

How to use drop-down menus as filters including an "All" option?

I have a list with clients and data about their orders (date, amount ordered, price etc.)
It is named [m]/[year] e.g. 1/23 for January 2023.
I am trying to create a separate sheet with statistics that would give me a better overview of the data in the first sheet. I'd like to sort it by the period, category and location which you can select from a drop-down menu.
I have this piece of code that takes the sheet name from Period and uses the Category and Location filter keywords to sum the totals from all orders corresponding with the selected filters.
=SUMIFS(INDIRECT($A2&"!"&"F2:F");INDIRECT($A2&"!"&"C2:C");$B$2;INDIRECT($A2&"!"&"D2:D");$C$2)
This works perfectly. However, I would like to implement an "All" option for the filters too.
Summing up everything at the same time wouldn't be such a problem, but the filters can have any combination of "All" options selected which adds up to 8 possible combinations between the three filters.
My thought process is to create 8 different branches of SUMIFS nested in an IFS function.
Is there a simpler, more elegant way of doing filters in Google Sheets? I am not just looking for t
he solution, I need a pointer in the right direction so that I can read up on it and learn it.
Here's a generalized example with some sample data to deal with your expected case scenario:
=sumif(A:A,if(D2="All","<>All",D2),B:B)

Summarise row data by removing blanks and use heading (Google Sheets)

I am looking for some help with summarising subject data.
We have 550 pupils who select subjects and our system outputs the information into a Google Sheet like this https://docs.google.com/spreadsheets/d/13rKygFBINl6nBBlHch0Gqo39iaoEYPTBfVCxoAs3QP4/edit?usp=sharing
I want the info to come out summarised, so we see the user info and the subjects they chose.
So this would mean when a cell is found to contain text along the row to reference the column heading and put this information into the second sheet under the subject 1 heading.
I have tried to show in sheet 2 called "Should look like this" so you can get an idea of what it should look like.
Is this possible in Google Sheets?
here is a copy of your sheet with the solution in cell A2 on the tab called Classes By Student.
=ARRAYFORMULA(IFERROR(SPLIT(TRANSPOSE(TRIM(QUERY(TRANSPOSE({Data!A2:E&CHAR(10),IF(Data!F2:AX="",,Data!F1:AX1&CHAR(10))}),,9^9))),CHAR(10)&" ",0,0)))
It is also possible to make a similar transformation that i've done on another tab called Students by Class.
QUERY() smush can be a powerful tool for problems like this. it consists of leveraging the query "header" argument to smush together entire columns of data all together, before splitting them back out without missing spaces.

LOOKUP with dropdown list doesn't work for some keys

(I apologize if this was answered somewhere else so if it was please share with me because I couldn't find anything)
I have two sheets, one with a long two-column list - first column: city, second column: office
I can't give away the details due to my job's privacy concerns but it is just to group certain cities with certain "offices" and I figured the easiest way to do this would just simply type the office name next to the city all the way down so I could use =lookup()
I have a dropdown list that references the range of cities on the next sheet (so all values match exactly as it is) and the cell next to it will populate the office name associated in the next column to the city name.
=LOOKUP(B2, Sheet2!A2:A, Sheet2!B2:B)
B2 being the cell with the dropdown list, Sheet2!A2:A being the list of cities and Sheet2!B2:B being the list of offices
There are no duplicates in the city list, I have removed them. Though currently, there is only one office type I have included on this sheet for now until I get this working.
Some dropdown items display the office name just fine, others (just random ones) display an error. I don't really understand since they're all in the same place.
I made a copy and moved it to my personal drive so you can look at it directly
https://docs.google.com/spreadsheets/d/1TF1bBQdC8ysA30YcGOmB1ojrvQGnfGrznWOrA1vzHZs/edit?usp=sharing
Thank you for any advice, I'm probably missing something simple or there is a better way to do this.
*update: there was really no point in editing this post but thanks?
use VLOOKUP instead of LOOKUP
=VLOOKUP(B2, Sheet2!A2:B, 2, 0)
if you have more cities you can use arrayformula:
=ARRAYFORMULA(IFERROR(VLOOKUP(B2:B, Sheet2!A2:B, 2, 0)))
Your lookup is not working because the search range is not sorted.
The documentation for LOOKUP has a note:
The LOOKUP function will only work properly if data in search_range or
search_result_array is sorted. Use VLOOKUP, HLOOKUP, or other related
functions if data is not sorted.
You can sort the cities in "Sheet 2", or you can use VLOOKUP instead since it supports unsorted ranges:
=VLOOKUP(B2, Sheet2!A:B, 2, FALSE)

Tracking Volunteer Hours Using Google Sheets

I'm trying to find an efficient way to keep track of volunteer hours for each member of a high school volunteer club using Google Sheets. Right now, I have four sheets, one for members of each grade. On the horizontal axis, I list every event and how many hours they volunteer for (or don't volunteer). However, it takes up a lot of columns and I end up having to continually add columns which is a pain, especially when passing the document on for the next "generation" of club officers.
I was thinking of having one sheet for all the members and another for all the events with names and hours of each person who volunteered. The only problem is, I want the main sheet to be able to search through the event sheet for a certain name and then add the hours that correspond to that found name to the total hours on the main sheet.
Is it even possible to search through a different sheet and return a value other than the index? To return a value in a cell next to that of the name?
There are many ways to do this. For a one function solution use QUERY.

Search and Replace Multiple Text with Arrayformula

I have a sheet that is populated by a form. On the form I have multiple questions and each question includes a bunch of options where they check off what they want. Because they're check boxes, when they submit the form, all the questions they choose populate into one cell where each question is separated by an comma.
My plan is to take that info and merge it into a Google Document; however what I want merged is a more detailed version of the question they answered.
Problem: The formula does what I need it to, however, I need it to work across multiple rows as new submissions come in and because I'm using =filter, it doesn't work with =arrayformula.
=concatenate("",filter('Look up Table'!B:B,search('Look up Table'!A:A,A2)))
Here is an example of what is happening.
Column A represents what has been submitted through the form. So the user chooses (with checkboxes) what is applicable. They have populated in one cell and are separated by commas.
Column B is my current formula that does a search by question and pulls in the formatted-version of the question (Look up Table tab). This is what merges into the document.
I'm hoping someone can help me find a new formula to use that does the same thing (and works with arrayformula) or perhaps lead me in another direction that I just haven't come across yet. I'm looking into vlookup and regexreplace to see if I can get that work as well.
Try this formula:
=ARRAYFORMULA(SUBSTITUTE(trim(transpose(query(IFERROR(vlookup((IFERROR(search(offset('Look up Table'!A1,,,COUNTA('Look up Table'!A:A)),TRANSPOSE(A2:A)))>0)*row(offset('Look up Table'!A1,,,COUNTA('Look up Table'!A:A))),{row(offset('Look up Table'!A1,,,COUNTA('Look up Table'!A:A))),offset('Look up Table'!B1,,,COUNTA('Look up Table'!A:A))},2,0)),,COUNTA('Look up Table'!A:A))))," "," "))
Look at example here

Resources