Creating a new Google Spreadsheet based on results in two sources - google-sheets

Using the "importHTML" function, I've scraped two tables from the web, containing results from weekly 5k races. These two tables now exist as two sheets within a Google Spreadsheets document, each of which are titled "19/11/11" and "12/11/11".
These sheets contain several columns, the most important of which are NAME and GRADE (a percentage value that "scores" your time based on your age.
For example:
Max LANCASTER
81.83%
Craig MITCHELL
76.58%
Andy MCGHEE
73.16%
I'd like to be able to create a new sheet with data that looks at this week's results (19/11/11) and compares it to last weeks (12/11/11). If the runner did not compete the previous week, then they are ignored, but if they did, their NAME and GRADE (for both weeks) is shown. This would allow me to sort on GRADE, and find who was the most improved runner.
Can any Google Spreadsheet experts help me figure this one out?
Thanks
Ronnie

There's most likely better ways of doing this than what I'll suggest, but since no experts answered you... here I go!
I'll suppose NAME is on column A and GRADE on B.
In a new "compare" sheet, with the following header:
NAME - GRADE A - GRADE B - DIFF
I'd add these formulas on row 2.
A2: =Filter('19/11/11'!A2:B;Match('19/11/11'!A2:A;'12/11/11'!A:A;0))
C2: =ArrayFormula(Transpose(Split(Concatenate(If(A2:A=Transpose('12/11/11'!A2:A);Transpose('12/11/11'!B2:B);"")&If(Transpose(Row('12/11/11'!A2:A))=Rows('12/11/11'!A2:A)+1;Char(9);""));Char(9))))
D2: =ArrayFormula(FILTER(B2:B-C2:C;A2:A<>""))
And if I'd like the sorted result (as you mentioned), I'd do this:
F1: =Sort(A:D;4;false)

Related

Google Sheets- Tally unchecked boxes across multiple sheets

I humbly seek your help.
I'm working on tabulating a bit o' data for a project at my school.
Spreadsheet Info
I have a spreadsheet where teachers have to click their name (which is linked to their own sheet). This brings the teachers to a sheet that contains the roster of their homeroom students. The teachers need to tick a box in columns B, C, and D to indicate if the students brought their charged chromebook, their charger, and their sleeve. They left the box unticked if the student did not complete this task. This spreadsheet contains 70 teacher's names and 1800 student names.
What I'm seeking help with
The teachers have completed their task- and I'm trying to tabulate the # of unchecked boxes for each column (B,C,D) per teacher (or, per sheet). I know how to sum the unchecked boxes. What I need help with is trying to find a way to apply a formula across 70 sheets w/ unique names (without manually typing each unique name in a formula). My limited formula knowledge results in being unable to copy down (or across) formulas when the sheet name is referenced via link in a column.
Simplified Example Sheet:
I have a simplified example linked below.
https://docs.google.com/spreadsheets/d/14MyEFUwm-QmdTf7oxrnJPnoZJEGyS32fAqmttalraCI/edit?usp=sharing
Thank you in advance, I appreciate the recommendations
I attempted the =sum(indirect) formula, but was unable to get that to work
try this formula in your sheet:
=MAKEARRAY(COUNTA(A2:A),3,LAMBDA(r,c,COUNTIF(INDIRECT(INDEX(A2:A,r)&INDEX({"!B:B","!C:C","!D:D"},c)),FALSE)))
You were probably right with COUNTIF and Indirect. Possibly you struggled with single apostrophes for the name of sheets with spaces. You can try this in B2:
=MAKEARRAY(COUNTA(A2:A),3,LAMBDA(r,c,COUNTIF(INDEX(INDIRECT("'"&INDEX(A2:A,r)&"'!B2:D"),,c),FALSE)))

How can I count the number of items listed on a different google sheet based on dates in 2 different cells and if another cell is blank?

I have a google doc that tracks information about employee training (Example 1). I have another google doc that needs to summarize the information (Example 2) from multiple different sheets which mirror example 1 but for different teams.
Example 1: this sheet is tracking employees start dates, dates they finish training, and if they have quit. (there are multiple different docs all with the same format that I'm pulling from using importrange).
I need a formula that will count the number of employees currently in training. So count if start date is equal to or after today, end date is equal to or less than today, and the quit column is blank.
If the formula worked the way it should, and I was looking at the summary doc on 11/10/2021, it should report 4 people in the "# in Training" column on the table below (Example 2).
I have tried using an ArrayFormula with CountIfs to accomplish this, but it still pulls 0. Here is the formula I've been playing with:
=ArrayFormula(COUNTIFS('tracker'!$B$2:$B, "<="&TODAY(), 'tracker'!$C$2:$C, ">="&TODAY(), 'tracker'!$D$2:$D,""))
Give a try on below formula-
=COUNTIFS(B2:B8,"<=" & DATE(2021,11,10),C2:C8,">=" & DATE(2021,11,10),D2:D8,"")

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?)

How to combine data from multiple Google Sheets and organize/filter it?

Here's my sample spreadsheet: https://docs.google.com/spreadsheets/d/1c-nXosPZvnEplFME6GHXlxuQUrVe4ImF5c5Go9_75DU/edit#gid=34769607
I use an API to import data from our time tracking app into Google Sheets. The "Project Details" sheet has most of the info about the projects, except for the hours spent on each project. So I have a "Project Hours" sheet that has the hours spent.
I want to combine these two things into one list in a separate "Main" sheet, as well as leave out columns that I don't care about. I really only care about the project name, the client name, the start date, end date, and total hours.
There must be a simple formula to use that gives me a clean list of all the projects and only shows me the data I care about, like QUERY or ARRAYFORMULA, but I'm not very familiar with those. Any help would be appreciated!
Craig. Yes, a QUERY with a VLOOKUP can accomplish this. I added a new tab (clearly marked as mine) to your example sheet. Being thorough, I wanted to include the column header in the last column as well, which makes the formula a bit longer than it would otherwise be in that it uses the IFERROR wrap on the VLOOKUP to assign the header for Row 1 (or otherwise leaves the last column blank if no match is found for a project name).
Here's the formula I used (though other approaches could certainly have been used as well):
=ArrayFormula({QUERY('Project Details'!A:Y,"Select B, Y, P, Q Where A Is Not Null"),IFERROR(VLOOKUP(QUERY('Project Details'!A:A,"Select * Where A Is Not Null"),'Project Hours'!A:E,5,FALSE),IF(ROW('Project Details'!A:A)=1,'Project Hours'!E$1,""))})

Summing based on multiple criteria

I have a problem similar to the one described in Excel: Sum values based on values in another column and mapped values
Solution there works in excel but unfortunately it doesn't work in google sheets.
How can this be done in google sheets and does anyone know why excel solution is not working in google sheets?
Edit 1:
Per request I am duplicating relevant info here:
On each day a single sport activity is organized and attending students receive bonus points. Students can attend activities each day to receive points.
Based on existing columns I need to calculate total bonus points for each student (column I)
Try:I2
=ARRAYFORMULA(MMULT(--REGEXMATCH(TRANSPOSE(B2:INDEX(B:B,COUNTA(B:B))),H2:H8),IFERROR(VLOOKUP(C2:INDEX(C:C,COUNTA(C:C)),E:F,2,0),0)))

Resources