B
Benjamin Yergler
Member since 4/26/2019

Achievements

To start earning badges, sign up to be a Product Expert in our Product Expert Program .

Activity

No recent activity
Post history
Google Docs Editors•1/27/2022
Thanks so much! That's a much simpler formula than I was thinking was needed! I came up with: 
=IFNA(Textjoin(", ",True,FILTER(ARRAYFORMULA(IF(G3:EP3 = "YES",G$1:EP$1,"")),Len(ARRAYFORMULA(IF(G3:EP3 = "YES",G$1:EP$1,"")))>1))), which seems to work also, but is much more cumbersome.

-Ben
Adam,

Thank you so much! That looks complicated, but great! Seems to working well. If I wanted to add an additional column to filter by, I can just add another clause to the query [and (H = "&TEXTJOIN("or H="...)], right?

Ben
Adam,

Thanks so much for the quick reply. It doesn't seem to be looking for matching period numbers, only IDs. When I typed another entry into the Class Rosters with that same ID but a different period, the filter still caught it. Can the query count 2 columns (ID and Period) and look for where Col1>1 and Col2>1?

Another follow up question: Some classes can be offered in two periods, say 3rd and 7th. Could the Filter and query look for both of those?

Thanks again!
Ben
Google Docs Editors•12/15/2020
Thanks so much Hyde! Can this not be done without the helper table? The real dataset I'm working with is several hundred rows of ID numbers. It looks like I'd have to have a formula in each cell. 

If you wouldn't mind, can you provide a bit of layman's terms explanation as to how this is working? I looked up Flatten() (which I didn't know existed) and I get countif(), but how is the row()-row(A20) working in this case?

Thank you,
Ben
Return all rows where a matching ID number is found
Google Docs Editors•12/5/2020
I have two datasets. One has a list of ID numbers with the number of Ds or Fs a student has (with filters and dropdown boxes built in), the other has the specific courses that student has a D or F in. I want to return all the rows (to see all the classes) that each student has when they show up on the first dataset.
I've tried query, filter, and vlookup and am able to return one of the classes from the D/F Report data, but can't get it to list all the classes for all the kids found on the EPS Data. I know I'm close, and need a little tweak, but just can't get it figured out.

Thanks in advance!
1 reply
Thanks Jean-Pierre. That helps. Looking at the output of the ArrayFormula separately makes it easy to see. I do have a few more follow up questions. I've never understood the difference between "select A" and "select Col1" in query. Is it only necessary to use Col language when the dataset your are querying is the output of another formula? Is that the main difference?

I tried adding a "where Col2 = '09'" clause to the query but it doesn't work because the ArrayFormula is only spitting out one column. How do I add Column B or C to the output so that it used as a filter condition with the "where" clause? I tried expanding all the A3:A's to A3:D, but it returns an error. 

Thanks for all your help with this!
Ben
Good catch. It looks like it's good now. Can you explain roughly how that formula is working? I'm having a hard time following it.

For the other cells, like "Freshmen with Multiples" can I just add conditions to the query language, like "where B = '09'"?
Thanks Jean-Pierre, I just realized I had it set to view only. It is now editable if you want to play around with it. Your formulas work, but they aren't adding up. I would think that the Singles and Multiples should add up to the total students.
Query giving erroneous "empty output" and Count(Query()) is summing not counting the results
Google Docs Editors•10/7/2019
https://docs.google.com/spreadsheets/d/1NbSs1NG4V-WPfEef3jvbVpDypvo6gAWmAIsDooV5-Ws/edit#gid=1472012100

On the sheet above, there are two highlighted cells in the D/F 9-23-19 tab. These are giving me issues. in the one, it is yielding "232" which is the sum of the results of a query, rather than the count of the results (should be 132; I know because when you run a regular query, it yields 132 rows). The highlighted cell in Column I should return a "1" because I added an entry to the "2019 RR Sign Ins" tab so that it would. Whatever is wrong with that formula is wrong with the whole column and several others. By the way, can I use an arrayformula there to simplify everything?

Thanks in advance!
Ben
1 reply
Thanks, Yogi. Why is N('Teacher Conflicts'!D2:H10+0) different from N('Teacher Conflicts'!D2:H10)? I added the +0 to the formula I originally had (from Lance) and it seems to work perfectly now. Just trying to understand what's happening under the hood.

Ben
Lance, et. al.,

Something isn't right with the formula in F4 still. Could you take a quick look at it again? When the date is set to 4/3/2019, it should only be returning 1 or 2 available teachers. It looks like its filtering out the first column of the query but not other columns. Also, it looks like the formula you wrote is missing a double quote and ampersand (&") at the end of the query, but its not giving an error. Why does the last part of the query not have those characters?
Lance, 

Thanks again for all your (and Yogi and Matt) help. Ok, one more quick question: How do you trim spaces in an Importrange? I expect that some people filling out the form will accidentally add a space to the end of their name and that will screw up the query in the sheet. I tried Trim(Importrange(...)), but it trims it to return just the first cell of the range to be imported. In the spreadsheet we've been working on, Yergler, D. has a space at the end.
Ben
Thanks Lance. That helps a lot. The matrix stuff is over my head, I think. I better stick to what I know, which isn't much. I never understood the Col1 vs. A distinction until now. Your explanation helps a lot. Thanks for you help on this. Our school's deans and secretaries do this by hand for about 150 teachers and all their conflicts. It takes a week or two. They'll be thrilled with this idea.
Ben
Is there no "Best Answer" option anymore?
Yogi, Lance, and Matt,

Thanks so much for working on this! I knew posting it would make the formula and process a lot cleaner. It looks like the converting to numbers idea works pretty well, as does the Filter idea. The MK tab is a good approach, too, but I don't think I need it that fancy. I'm doing this for a colleague in my school who I think would freak out seeing all the error messages.

Can you guys tell me the difference between Matt's filter method and Lance's numbers method? Is there a situation where one is better than the other (for instance if a form response leaves all the conflict columns blank)? Why does the query work better saying Col1 instead of A? Is that because now they are all numbers?

Thanks again, guys! Much appreciated!
Ben
false
7993684721008359173
true
Search Help Center
true
true
true
true
true
102095
Search
Clear search
Close search
Main menu
false