How do I transpose data from multiple columns into a row? - google-sheets

I'm creating a Google Sheet to input multiple choice answers and I'd like to map the answers (Output Column in my student sheets) to a summary sheet. I have separate tabs for each student. I've used transpose, but this formula removes blank cells.
=transpose({Student1!B2:B4;Student1!E7:E81;Student1!I7:I66})
I need to show any blank cells since this means the student didn't provide an answer to the question. Ultimately, the ImportMap tab will be exported to a CSV to be graded.
Student1 maps to row 1 of ImportMap
Student2 maps to row 2 of ImportMap
Student3 maps to row 3 of ImportMap
Also, is it possible to create a command that clears all of the students' answers from the different tabs? Students' answers are located in the Output Column of each student tab. For example, E7:E81.
https://docs.google.com/spreadsheets/d/120SI4Zo6z-ZFAg_MYEQwbOAzzhaXHohDQAEIFFXOoRU/edit?usp=sharing

try in A1 and drag down:
=IFERROR(TRANSPOSE({
INDIRECT("Student"&ROW(A1)&"!B2:B4");
INDIRECT("Student"&ROW(A1)&"!E7:E81");
INDIRECT("Student"&ROW(A1)&"!I7:I66");
INDIRECT("Student"&ROW(A1)&"!M7:M46");
INDIRECT("Student"&ROW(A1)&"!Q7:Q46")}))

Related

Filter out names that are not in the grouped sheet - Google Sheet

I have two sheets. One is containing names that have been grouped. The other contains ungrouped names. Now, there are some names in the ungrouped that do not appear in the grouped which means some names are missing from the grouped sheet. I need to filter out which names are not in the grouped sheets to come out in a column. Any help is appreciated. The link is below.
https://docs.google.com/spreadsheets/d/1nTO3Y3uktKKU-GgHuXYoyBuYz0zzGXr6ygBhFNDA2_o/edit?usp=sharing
And yes, I have tried many of the answers here already, they are not working for me.
How can I retrieve the values in a column that are not contained in another column in google sheets
This came close but its for column. I'm checking the whole sheet.
I have tried VLOOKUP
I even tried this custom functions, they are all not working or I'm doing it wrongly.
What I expect to happen is:
A column containing names that are in the sheet 2 but not in sheet one.
Can you try this out:
=filter(A:A,iserror(xmatch(A:A,(tocol(choosecols('Sheet 1'!B4:R48,sequence(1,9,1,2)),1)))))

How to link 3 columns together in Google sheets

I have 3 columns in a Google sheets tab.
Two of the columns are fed into from another tab (Sheet1) by the formulas =Sheet1!A2:A and =Sheet1!B2:B.
I am facing a problem when the 2 columns from sheet1 are sorted, the third column from sheet2 does not stay aligned with the other two and throws off my entire sheet's analysis. Is there a way to link the 3 columns together so when I sort from sheet1, all 3 columns from sheet2 are sorted and not just the first 2 that are being fed into from sheet1?
The short answer is that you can't. Sheets is not a relational database in which rows between sheets will remain linked.
What you can do is to work everything in a Master sheet so everything is sort together, or continue with your system but never "really" sorting your Sheet1. Instead, in any of both cases, you can use Filter Views. Filter views affect the way each user sees the information without altering the other users' views. That way you could just hide columns in Filter View in a single Master Sheet and everyone works in just one sheet; or "sort" the Master Sheet only when you're inside the Filter View, so the connected data always remain in the same rows.
I suggest you consider this possibility. Other ways are via scripts, which could be a headache by implementing it, always syncing and checking every kind of modification, sorting issue and more. Hope it's useful! There are many tutorials and documentation online; here you have just one as example

Importrange Query Google Sheet Include SheetName

I'm using Query and Importrange to pull details from other tabs on a Google Sheet.
The other tabs are linked to individual Google Forms.
I'd like to include the name of the sheet the data came from in the query but can't figure out a way to do this.
Any ideas?
I did try having a column on each sheet that contained the name of the sheet i.e. a column on sheet1 where all the entries are sheet1. Then with the query have that column included in the selection.
However, when new Google Forms submissions are made, a new row is added (I think) and the column that contains the sheet name now has a empty entry where the new row was added.
I'm not able to share the sheet as it contains student info from school and it's not-shareable outside my organisation.
Most likely you are using a drag-down style formula within the form responses tab which would cause this rows not aligning with your already included formula as & when new responses pop in!
You could just use an arrayformula accommodated in the first row_cell itself as shown in the screenshot and it should fix this thing. Please do test it out and let us know if its solved or aint.
=INDEX(IF(LEN(A:A),"SHEET 1",))

Display columns of information in Google Sheets based on Drop down selection

What I am looking to do is have a list of items in a dropdown list in cell A1. Lets say the list is "Presidents, Movie Stars, Rappers".
When I select Presidents I want Column B in Sheet 1 to list all the presidents with column C listing their party they represented and column D to list their years in office. When I select Movie stars I want column B to List various Movie Star names, Column C to list number of movies starred in and Column D to display their highest paid film.
So in short I want 1 dropdown to populate 3 columns worth of data.
Everything I have looked up uses scripts(which I think this is completely doable without using) uses VLOOKUP but has 1 cell worth of data appear(ex, A1 dropdown displays data in A2 but not data in B1:B50, C1:C50, and D1:D50) or doesnt worth with multiple columns of data. I am fine if the data pulls from another sheet I just think there is a better way to do this then filling in 200+ cells with an if:then function based on my selection in cell A1. Anyone know an easy way to do this?
An elegant solution, in my opinion, is to do something like the following:
Create a column (which you can later hide) that has all value combinations, with a delimiter between the values. For example, you could have "Presidents>Barack Obama>Democrat>2008-2016"
Then create a simple function (no VLOOKUP needed!) to pull the individual values by using FIND to findn the location of the delimiters and split the combination.

Copy the last populated row in a Google Sheet to a different spreadsheet

I'm new to programming and would really appreciate some help.
I have two different spreadsheets, one named Database (this is where we put all the details) and the other is named Checklist, both have 1 worksheet each named Sheet1.
Now, what I wanted to do is to get the last populated row from the Database spreadsheet into the Checklist spreadsheet.
I know a formula like:
=FILTER('Sheet 2'!A:A , ROW('Sheet 2'!A:A) =MAX( FILTER( ROW('Sheet 2'!A:A) , NOT(ISBLANK('Sheet 2'!A:A)))))
This gets the last populated row, but this only works within one spreadsheet and doesn't work when I'm working on two different spreadsheets.
How can I get this formula to work with 2 different spreadsheets?
Thank you so much
To access data from another spreadsheet, you can use IMPORTRANGE() (documentation). I suggest you create a new sheet in your Checklist spreadsheet and import the sheet you need from Database into it. Then you'll be able to use your formula.
In Checklist, create a new sheet called "[IMPORTED] Database" (or something like that)
In cell A1 of "[IMPORTED] Database", enter =IMPORTRANGE("database_spreadsheet_url", "Sheet1!A:Z") (modify the range to be what you actually need)
Now adjust your formula for getting the last value to be =FILTER('[IMPORTED] Database'!A:A, ROW('[IMPORTED] Database'!A:A)=MAX(FILTER(ROW('[IMPORTED] Database'!A:A), NOT(ISBLANK('[IMPORTED] Database'!A:A)))))

Resources