I have three columns in my table product name, product color, and product brand. The table is pretty much static, I just import the data once and it does not get modified. An example would be small car, red, motor co. I want to be able to search for and get a result for "car red".
If I use
name_or_color_or_brand_contains
I do not get any results.
Is there a way to collapse the three columns during the search or is creating a column that has the info of the three column a possible solution seeing that my data does not change that much.
Thanks!
Related
I am trying to create a sheet to determine the amount of overlapping hours for employees.
I have one table with timeclock data for the Employees.
Table 1
And another with timeclock data for their Support Staff.
Table 2
This is the desired output. Each row from table A has all the date matches from table B. From here I would compute the number of overlapping hours in the final column and then roll that up into another sheet.
Table 3, Desired Output
(apologies for image links, I can't post inline images yet)
Sample sheet here Please let me know if you have any ideas for me!
I know its a combination of QUERY, ARRAYFORMULA, FILTER and more but I just can't find the right combo.
Here's a way of doing this type of join using only built-in functions:
=arrayformula(lambda(employee,support,
lambda(datecomp,
lambda(rows,
{vlookup(index(rows,,1),{row(employee),employee},sequence(1,columns(employee),2),false),
vlookup(index(rows,,2),{row(support),support},sequence(1,columns(support),2),false)})(
split(filter(datecomp,datecomp<>""),"|")))(
flatten(if(index(employee,,1)=transpose(index(support,,1)),row(employee)&"|"&transpose(row(support)),))))(
Employee!A1:D6,Support!A1:E5))
There's a lot going on here, but the basic idea is that we are comparing the date columns of each table against each other in a 2D IF array, and where the dates match we are obtaining the row index of each table. After some manipulations we can use these row indexes on each table in two side-by-side VLOOKUPs to obtain the joined table.
DMac,
I wrote myself a QUERY replacement custom function that uses real SQL select syntax.
For your data it looks something like (You need a tab called employee and a tab called support for this to work) :
=gsSQL("select * from employee full join support on employee.date = support.date")
See my test worksheet: (line 164 on gsSqlTest sheet)
https://docs.google.com/spreadsheets/d/1Zmyk7a7u0xvICrxen-c0CdpssrLTkHwYx6XL00Tb1ws/edit?usp=sharing
You need to add one Apps Script file to your sheet to give you the custom function:
https://github.com/demmings/gsSQL/blob/main/dist/gssql.js
For more help using more features see:
https://github.com/demmings/gsSQL
For example, changing the column titles, it would be like:
select employee.name as name .... (rest of your select).
I am looking for some help with summarising subject data.
We have 550 pupils who select subjects and our system outputs the information into a Google Sheet like this https://docs.google.com/spreadsheets/d/13rKygFBINl6nBBlHch0Gqo39iaoEYPTBfVCxoAs3QP4/edit?usp=sharing
I want the info to come out summarised, so we see the user info and the subjects they chose.
So this would mean when a cell is found to contain text along the row to reference the column heading and put this information into the second sheet under the subject 1 heading.
I have tried to show in sheet 2 called "Should look like this" so you can get an idea of what it should look like.
Is this possible in Google Sheets?
here is a copy of your sheet with the solution in cell A2 on the tab called Classes By Student.
=ARRAYFORMULA(IFERROR(SPLIT(TRANSPOSE(TRIM(QUERY(TRANSPOSE({Data!A2:E&CHAR(10),IF(Data!F2:AX="",,Data!F1:AX1&CHAR(10))}),,9^9))),CHAR(10)&" ",0,0)))
It is also possible to make a similar transformation that i've done on another tab called Students by Class.
QUERY() smush can be a powerful tool for problems like this. it consists of leveraging the query "header" argument to smush together entire columns of data all together, before splitting them back out without missing spaces.
That's about as clear as I make what I'm trying to do in Google Sheets.
Here's a sample table with two tabs.
Tab 1
Basically, I've got a table fed from a form. One column has names of say 50 various people. The names repeat randomly.
Other columns contain comments that each person made.
Tab 2
Here is essentially a heat map of keywords used by the different people. Column A are the keywords, while row 1 contains the keywords I'm interested in.
Each cell in this grid should (1) search tab 1 for all instances of each name, then (2) count the number of times the keyword appears in all of that person's comments.
Countifs doesn't work because the array arguments are different sizes.
I can't figure out how to phrase a filter embedded in a countif.
And using QUERY seems like it will cause trouble because my actual spreadsheet is something like 100 names and 40 keywords.
I'm open to suggestions and grateful for your help!
ken.
In B2 try
=sum(ArrayFormula(--regexmatch(filter(Sheet1!$B$2:$F, Sheet1!$A$2:$A=B$1), "\b"&$A2&"\b")))
Then fill down to the right and down as far as needed.
To make the match case-insensitive, change "\b"&$A2&"\b" to
"\b(?i)"&$A2&"\b"
See if that works?
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.
I have an excel sheet which shows the names of 1,900 borrowers. The sheet is not sorted out in alphabetical order (and it does not need to be sorted in alphabetical order). What I am trying to perform is that I want to compare the two column and see if they match. If the two columns do not match I want that result to be shown either in separate column or those names of the countries and responsible person to be highlighted.
For example, the below screen shot shows that there are various countries in the list and there is various responsible person associated with each country. The idea is to identify the countries whose responsible person are not the same. So in this example countries USA & AUSTRALIA should not show up because they have the same responsible person but all other countries and responsible person should be identified. I appreciate and thanks for all the help.
You can solve this by creating a pivot table of your data. Insert pivot table and then add Country name and count of responsible person as grouping (assuming no duplicates) then anything with a count greater than 2 is an issue.