Summarise row data by removing blanks and use heading (Google Sheets) - 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.

Related

Google Sheets: How to Filter Vertically Merged Cells

I've come looking for help regarding this issue. I'm a teacher, and am trying to help my students get all their documents together for university applications. Google Sheets tell me that I'm not able to filter cells containing vertical merges, but I want to filter by the earliest application deadline (column G) so I know which student I have to chase up first, second, third, etc., without losing the rest of the data in the row.
Does anyone know a good way of doing this? I've created a sample of my spreadsheet: here.
Thanks in advance.
Try Insert > New sheet and this formula in cell A1 of the new sheet:
=query('2021'!A1:Z, "where G is not null order by G", 1)
The sorted list is for reference only. You will need to continue to do your editing in the 2021 sheet.
I would split the data between a couple of sheets.
In the first sheet you'd have important data that can be seen at a glance and filtered easily, like student names, universities and deadlines.
In the second sheet (which you can link by student name or id) you can put extra info like necessary documents, urls etc - something like this.
Alternatively keep all the info in one sheet but don't use split columns or rows - it isn't conducive for sorting, filtering and viewing data (and what's the point of data if you can't analyse it?)

Distinguish between two variables in one column

I am working with dynamic data which will populate my Google Sheet from a Form.
Basically we work with two companies at a time who assess different client opportunities. This sheet feeds into Google Data Studio.
In order to avoid manipulating the data in the sheet each time we want to display info in Data Studio, for each client that is assessed I am trying to use a formula to attach a tag in column F. Client assessed with the number 1 for the first assessment and Client assessed with the number 2. I.e: Lloyds1 or Lloyds2.
This would be easily doable if only one person from each company assessed client account but in fact it could be two or three from each company.
In the case of one person from each company i used this:
=IF(ISBLANK($D2),,(D2&COUNTIF($D$2:$D2,D2))) - worked because there would only ever be two entries
I've tried to adapt this to COUNTIFS but it doesn't work.
Hopefully I explained this problem ok and someone can help
Link to sample spreadsheet:
https://docs.google.com/spreadsheets/d/10sqp0zpThdtdRws2p2Dqs0n8IwxwBIpwk-ibH5vofGQ/edit?usp=sharing
So, I couldn't do it all in one formula as the countifs was not working for me as well. So I had to do it in a support table (which you can put in a support tab or something where you can hide it):
The support table I did was the following:
cell A2: formula: =ARRAYFORMULA(if(len(B2:B),B2:B&""&C2:C,))
cell B2: formula =unique(E2:F)
cell D2: formula =ArrayFormula(if(len(B2:B),countifs(B2:B,B2:B,row(B2:B),"<="&row(B2:B)),))
And then in the cell, you want you may have the following:
=ArrayFormula(IF(ISBLANK(E2:E),,(E2:E&vlookup(E2:E&""&F2:F,A2:D,4,false))))
It should look like this:
It is not the neatest solution, but it works and is dynamic

Google Sheet function to Split the Data Accordingly

I have a worksheet being fed by a Google Form. I want the responses on the Google Form to populate two fields in the next tab. The B column in the second tab is the one beyond my skillset. I have written out how the field should display, based on the form responses for reference. I also have used comments on the sheet to explain the rules for each field.
I know split function can be used but it wont adjust it. any possible solution.
Here the Sheet link
https://docs.google.com/spreadsheets/d/1ueKCNdcn1xmJHYtrzKKKkj_FSraRfpvJS4Oi3BHNUvk/edit?usp=sharing
I've added an answer on your sheet. Since the data is all delineated by semi-colons, this formula seems to match what you want.
=SPLIT('Import Data'!B1,";",0,0)
Let us know if it doesn't do what you want, or if this helps.
Updated: After checking with you, I realise that you want only some of the data split, and some kept concatenated. But since all of the data "fields" look the same, separated by semi-colons, and since there could be various numbers of fields in each response category, I don't think there is a simple logic that can tell where to split, and where to keep things like dress styles or sizes concatenated. So I understand that this is not your desired answer.

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.

Count specific words in table for each row that begins with a cell of a certain value (Google Sheets)

That's about as clear as I make what I'm trying to do in Google Sheets.
Here's a sample table with two tabs.
Tab 1
Basically, I've got a table fed from a form. One column has names of say 50 various people. The names repeat randomly.
Other columns contain comments that each person made.
Tab 2
Here is essentially a heat map of keywords used by the different people. Column A are the keywords, while row 1 contains the keywords I'm interested in.
Each cell in this grid should (1) search tab 1 for all instances of each name, then (2) count the number of times the keyword appears in all of that person's comments.
Countifs doesn't work because the array arguments are different sizes.
I can't figure out how to phrase a filter embedded in a countif.
And using QUERY seems like it will cause trouble because my actual spreadsheet is something like 100 names and 40 keywords.
I'm open to suggestions and grateful for your help!
ken.
In B2 try
=sum(ArrayFormula(--regexmatch(filter(Sheet1!$B$2:$F, Sheet1!$A$2:$A=B$1), "\b"&$A2&"\b")))
Then fill down to the right and down as far as needed.
To make the match case-insensitive, change "\b"&$A2&"\b" to
"\b(?i)"&$A2&"\b"
See if that works?

Resources