Google sheets - tranposing certain column to rows - google-sheets

i have the link to my sample google sheet:
https://docs.google.com/spreadsheets/d/1Tyy7LsdXULAw09hE8yeJOyVfsziHiApXjdkK3-13E9c/edit#gid=1854242803
My data sample is like Sheet1, and the output I'm trying to get is in Sheet 2. Basically, the Cells C4:C9 in Sheet 1, and put to Cells C8:C14 in Sheet 2 (and many more similar columns). So I want to ‘cascade’ the rows in this way.
Edit: What I've tried was basic moving each column with their own function,column by column. But its not so efficient, with each column having their own function. Is there some more elegant way?

Related

Google Sheet SUMIF across range of cells

I am trying to use a formula in google sheets to find averages based on the contents of a different cell.
Below is some sample data, I am pretty sure I have done similar in the past in Excel by using table headers as a reference but struggling to see how to achieve this in google sheets.
Columns B, C, D to be calculated, currently this is the formula used for D3 (same sort of thing for D4) =IFERROR(ROUND(SUM(E3:H3)/COUNT(E3:H3),2),0)
Just needing to work out the formula for the cells with red text, any help would be appreciated.
as an example C3 would be the average for any numbers in row 3 where it has DeviceB e.g. (2+10+6)/3
Try
=AVERAGEIF($E$2:$H$2,B$1,$E3:$H3)
AVERAGEIF

How to use CountIf in Google Sheets that only counts cells if there is content in another cell?

I need some help with a CountIf type formula in Google Sheets.
I have a large spreadsheet of a consolidated NHL schedule where I am going to enter stats that I care about. In a separate spreadsheet I am going to have averages for the stats I care about.
I want to have a formula that uses the Column A of Sheet2 to count the games in Sheet1 that have content in the other cells of Sheet1 (so, games that have been played).
If this works then Column B of Sheet2 will have the correct # of games played which is all the cells that have content/stats next to the teams name in Sheet1 so that I dont have to manually update that part and then the count of games played can go straight to the average formula.
The pictures are manually entered but just showing that since the Blackhawks have content next to their name in Sheet1, I would want Sheet2 Column B to read 1 based on a formula.
Thanks!!!
Sheet1
Sheet2
I would just do a COUNTA on a column (so that counts the rows in a specific column that are not blank), on a filtered table that match the team names:
So:
=COUNTA(FILTER(Sheet1!D:D,Sheet1!B:B=A3))

Get referenced cell and sheet for data validation value in Google Sheets

I've created a list of Foods in a Google Sheet.
On another sheet I reference A2:A100 to create a data validation list to select from.
I am trying to figure out how to auto-fill the equivalent columns on the other sheet depending on which food is selected but the value in the data validation list is simply text, so I cannot figure out how to get the row it is on to transfer the values onto the new sheet.
This is what I have right now:
This is what I am trying to get it to look like:
If I change any of the foods, I want columns B - H to automatically fill in with the correct values from the Foods sheet.
How can I do this?
You can use couple of methods
Using DGET
=IFERROR(ArrayFormula(DGET('Foods'!$A$1:$K$100,{"calories","sat","poly","mono","fiber","carbs","protein"},{"Food";$A2})))
OR
=IFERROR(ArrayFormula(DGET('Foods'!$A$1:$K$100,{$B$1,$C$1,$D$1,$E$1,$F$1,$G$1,$H$1},{"Food";$A2})))
Using VLOOKUP
=IFNA(ArrayFormula(VLOOKUP($A2,'Foods'!$A$1:$K$100,{5,6,7,8,9,10,11},FALSE)))
Place the formula on cell B1 and drag down.
Functions used:
DGET
ArrayFormula
IFERROR
VLOOKUP
IFNA

Finding non zero row number in a google sheet from another sheet

I've looked on stackoverflow and Google forums for an answer to this but couldn't quite find what I wanted.
I have numerous sheets with different names, such as "members", "officers", "trustees" etc and each one has columns for peoples names, followed by birthdates, addresses etc. (each sheet has no header). I am trying to find the number of occupied rows in each sheet from another sheet, to give the number of people.
So, for instance, if I have a sheet called "numbers", the A1 would be the number of non-zero rows in "members", the B1 would be the same for "officers" etc.
I've referenced cells in other sheets before by doing something like =members!A14 but I don't know how to find the row number of the last row from another sheet. Can anyone help please? Ideally, I'd like this to be a formula rather than a function call.
This will count the number of non-blank cells in column A on the sheet named members.
=counta(members!A1:A)

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