I am trying to list all the locations my teammates look after. I need help with my formula.
=INDEX($B$2:$B$175,MATCH(0,IF($K$2=$D$2:$D$175,COUNTIF($L$2:$L2,$B$2:$B$175),""),0))
Some have 1 location and others have as much as 34.
What I want to accomplish is that when I select, in this example Jose Y, it will show all 34 properties that he looks out for.
based on your uploaded image use:
=JOIN(", ", FILTER(A:A, C:C=E2))
or not joined:
=QUERY(A:C, "select A where C = '"&E2&"'", 0)
Related
In order to clarify the scenario, please check the example here:
https://docs.google.com/spreadsheets/d/1E_xyPvkTIObG5JA4UfG1EQa74cFEc9QiznidJ4HSmEY/edit?usp=sharing
What I want to do here is to:
filter by date (matching a certain date)
filter by product id (matching a list of specified ids)
sum up the total
I did try to find some ideas, though none of them worked, including the solution in the article below
https://exceljet.net/formula/sumifs-with-multiple-criteria-and-or-logic
Really appriciate if someone could point me in the right direction, thanks!
use:
=QUERY({'raw data'!A2:C},
"select Col1,sum(Col3)
where Col2 matches '"&TEXTJOIN("|", 1, 'ids to match'!A2:A)&"'
group by Col1
order by Col1 desc
label sum(Col3)''")
Sumifs is different than Sumif. You also have some text mixed with numbers. Your dates are text while Column b is numeric. Try this:
=Sumifs(C:C:,A:A,"2022-09-08",B:B,82267,B:B,82602) +
Sumifs(C:C:,A:A,"2022-09-08",B:B,82267,B:B,82602B:B,82604)
As Player() points out, if you have too many products to include, using sumifs would get pretty tedious and you ought to consider using a different function (i'd use filter). However since your question was Sumifs related, that's your answer.
To illustrate how this would work with something Filter, you could do this:
=sum(filter('raw data'!C:C,('raw data'!A:A=A2)*
(isnumber(match('raw data'!B:B,'ids to match'!A:A,0)))))
Here I am again, asking amateur questions. Hope you guys able to help out. What I want to accomplish here is to use query formula to select unique in Col A and after that to count each categories respectively. As I want to make this dynamic, I also to able to further filter based on the criteria in I2 and I3.
Here is the link to the trix link
use:
=QUERY(A4:C,
"select A,count(A)
where C = '"&I3&"'
and B = '"&I2&"' group by A
label count(A)''")
btw, those are not dates. you can check it with ISDATE() function
I'm building a Google Sheet table and I am stuck on a specific query I want to make
Source Table pic here
I need to sort my Names by "Type" and by "ValueType".
I managed to sort them by "Type" with ease, but i'm stuck on the sort by "ValueType" part, because they are in columns, not lines and I can't manage to find a way to sort them by columns
My Query looks like this right now
=QUERY(A1:G8; "SELECT * WHERE A='Type1'; 1)
I want it to look something like this :
=QUERY(A1:G8; "SELECT * WHERE A='Type1' AND C1:G1='ValueType 1'"; 1)
Is it possible to do something like this, and if so, can you please tell me what is the syntax?
Thanks in advance.
=QUERY(A1:G8; "SELECT * WHERE A='Type1' AND (C='"&C$1&"' or D='"&D$1&"') "; 1)
adding or X='"&X$1&"' within the () where X is the next letter.
'"&C$1&"' is the value in cell C$1 but you can adapt that for a different value on your sheet, or a fixed value using C='xxx'
You need to expand the formula, or you can do it too (if the number of columns is not fixed)
=QUERY({A1:G8}, "SELECT * WHERE Col1='Type1' and (" & "Col"&arrayformula(TEXTJOIN("='ValueType 1' or Col",,column(C:G)))&"='ValueType 1' )", 1)
try just that sentence to understand how it has been built
="Col"&arrayformula(TEXTJOIN("='ValueType 1' or Col",,column(C:G)))&"='ValueType 1'"
sample attendance (google) sheet
I want count the number of total lates per student name on this sample sheet, e.g, how many lates Mary Love has (actual sheet has over 30,000 rows, 10 columns). If possible, this count needs to change as students have additional lates. I'd really appreciate any help someone might be able to provide. I thank you very much in advance.
In addition to previous post, a QUERY() function also seems a good option as it can output a 2D-array, containing the names and the counts in one formula (no need to drag down). As an example, try:
=query(A:G, "select A, count(B) where B ='Late' group by A ", 1)
If you want to limit the result tho those who had more then 3 late's, you can do:
=query(query(A:G, "select A, count(B) where B ='Late' group by A ", 1), "where Col2 > 3")
Also further filtering with date can be done very easily. However I think that may require some 'cleaning up' of the current data: I noticed a lot of different date formats in col D... :-)
For counting each of several students and to allow greater versatility I suggest a pivot table with Student Name for Rows, Late for Values with Summarise by: COUNTA and Late for Filter with Show: Late.
You can use the COUNTIFS function to get what you are looking for. This formula will count all matches for multiple criteria ranges and criteria (e.g. student name & late).
This is the syntax for the formula:
COUNTIFS(criteria_range1, criteria1, [criteria_range2, criteria2]…)
If you put Mary Love in cell I2, you could then put this in J2.
=countifs(B:B,"=late", A:A,I2)
Then as more rows are added it will automatically update the "lates". I would also suggest using named ranges, then you could replace B:B and A:A with the named range.
I would suggest using the =query function as documented below. If that doesn't meet your needs you could modify the above:
=if (countifs(B:B,"=Late", A:A,I2, D:D, ">="&N2) >= 3, "True", "False")
This will put "True" in the column if there are 3 or more lates, false if not. This will require you put the date you want to check against in column N2. Change N2 above if you want to use a different column.
I would like to perform a multi criteria search of data in a column- contains data of check boxes(more than one option chosen).
For a clearer picture of what I am trying to do, screenshot below is a question in a form
Data from the form are saved in sheets like below,
So my concern here is if I would like to search/filter for the rows that contain "Commercial", the rows with Commercial,Engineering doesn't show up. That's definitely not an effective search.
Any advise on how can I go about this issue is kindly appreciated. If
Let's say you have your form in the response sheet in columns A to P, with the multiple choice in col D. If you want to filter your data on the word 'Commercial' you can either do:
=filter(A2:P, regexmatch(A2:P, "Commercial"))
or use query():
=query(A2:P, "select * where B contains 'Commercial' ")
Note: depending on your locale you may have to change the commas to semi-colons in order for the formulas to work.
I hope that helps ?
Following JPV's answer, I developed a line to make the query useful if you want to cross two categories. Let's suppose that someone in your checkbox example had picked all the options (IT, HR, Commercial, Engineering); and that you have created the cell with the dropdown option box in cell B1 with all your options, as JPV said.
Then, you want to filter and see all the people who had chosen IT and Commercial. You would, for that, create a second cell with the dropdown option box in, lets say C1; and then your query would be:
=query(A2:P, "select * where B contains '"&B1&"' and B contains '"&C1&"' ")
=FILTER(MOBILE!A2:E2000, ISNUMBER(SEARCH(A1,MOBILE!A2:A2000)))
SEARCH function will return a number of the position of the searched word (A1) in the searched strings in range (MOBILE!A2:A2000).
If the result of search is a number (ISNUMBER), then filter will return the TRUE rows result from the range MOBILE!A2:E2000.