Display the values using query function [closed] - google-sheets

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I want to display the values according to the text that which is comes in the drop-down list. one of my friends from this platform helped me to develop that. But that function is only displaying based on two texts. can I add it one more text to generate details?
Here I'm adding the sheet for more clarification. Take a look and you will understand what I need. I want to display which comes under "insurance claim" when we select yes/no.
https://docs.google.com/spreadsheets/d/1VsLKHSZsTMeBctnINnsixKISgNkTHDV-dkO4ORsDjgI/edit#gid=595280251

You just need to add the and F contains '"&$C2&"'" to your current formula on the cell A5 of the sheet RESULTS.
For more details please see the Query documentation
Your cell A5 will become this:
=query(LIST!A1:G,"Select * where B contains '"&$A2&"' and C contains '"&$B2&"' and F contains '"&$C2&"'")
If you want to have the values of both sheets in your RESULTS sheet, you can add the other sheet to the range of the query:
=query({LIST!A1:G;LIST2!A1:G},"Select * where Col2 contains '"&$A2&"' and Col3 contains '"&$B2&"' and Col6 contains '"&$C2&"'")

Related

Trying to nest a transpose formula inside an array formula [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed yesterday.
Improve this question
Here's the sheet: https://docs.google.com/spreadsheets/d/1TbPKehggzCGWy6LyEuzHZc5RouBHhyju35bqIGpInhM/edit#gid=14120435
I know how to transpose the data in colA (=Transpose(A2:A)). I know how to write an array formula to output the data i'd like (F1), but I'd like to nest the Transpose formula into the formula in F1 so that as items are added to colA, the table on the right populates with the header rows relying on the values in A2:A and the data as it is in ColF
You could try:
=ARRAYFORMULA(LET(header,TOROW(A2:A,1),{header;IF(D2:D="",,E2:E*VLOOKUP(header,A:B,2,))}))
Or:
=ARRAYFORMULA(LET(header,TRANSPOSE(FILTER(A2:A,A2:A<>"")),{header;IF(D2:D="",,E2:E*VLOOKUP(header,A:B,2,))}))

google inner join the spreadsheets [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
I've got two sheets, say "Products" and "Price", in both sheets there is a column "productid". I want to have a new column in sheet "Products", say "new_price" and get it from sheet "price".
Using SQL it would be no brainer:
select a.col1, b.price as 'new_price' inner join products as a inner join price as b on a.productid = b.productid
how to do it right in the google sheet?
The QUERY() function is modeled after SQL and is very powerful. However, not all SQL is supported such as JOINs. There are complicated formulas that can do that using various combinations of functions. I decided to write my own JOIN, I called it denormalize.
Here are some examples of usage:
=denormalize("Employees","Orders",1,3)
=denormalize("Employees","Orders",1,3,"full")
=QUERY(denormalize("Employees","Orders",1,3,"left"), "SELECT * ", FALSE)
You can get the complete custom function with lots of examples here:
https://docs.google.com/spreadsheets/d/1vziuF8gQcsOxTLEtlcU2cgTAYL1eIaaMTAoIrAS7mnE/edit#gid=0
Make a copy and check out the custom function in the script editor.

How to consolidate data in google sheet using query function [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
Hell,
I encountered one problem while combining different sheets(tabs) into one master sheet, e.g I have three sheets named Cola, Pepsi & Thumbsup, I consolidated their results all in my Master sheet using Query formula with null. Whenever anyone entered data in Cola, Pepsi & Thumbsup sheet it comes to my master sheet somewhere in Between the rows. I need it to comes queue wise, is it possible?
The problem I faced is, I am writing a remark on my master sheet on each entry so whenever someone added new data in Cola, Pepsi & Thumbsup it inserted in between the data and break the sequence of my remarks.
The remark I wrote for e.g Cola 103 it shift to cola 102 when someone enters new data in cola sheet.
About the query, it just displays the values. It's kind of impossible to control as your mention. I recommend to use app-script (macro), function append or getValue setValue or getRange copyto as text paste not just display
If your data have timestamp each row. It might work, sort by depending on date and time added. Need to use just one column sorted. In function query ...order by A asc
Anyways, I still recommend to use app-script (macro)

Sheets - turn string of letters into a string that contains a count of each letter [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I've been working on a complicated project in google sheets:
I have a 10x10 box, in which each cell can be 1 of 6 things: A, B, C, D, E, empty
Any given row or column (single row/column input is very important to the purpose of the formula) should return a string of numbers that is 6 digits, with the first digit signifying the count of A and the last digit signifying the count of empty.
So if one of the rows contains |D| |D|D|C|A| |C|B| | it should return: 112303.
The closest component I had working/was happy with was:
(concatenate(transpose(sort(transpose(A1:AJ),1,true))))
this formula returns abccddd when using the example above as input
I worked with a lot of different functions and only got it to output numbers to a degree; everything I tried didn't produce the desired result and/or was extremely clunky, long, ridiculous and un-maintainable.
Thanks for any help in advance :)
Use countif()
=ArrayFormula(concatenate(COUNTIF(A1:J1,{"A","B","C","D","E",""})))

How can I list each row that matches a string, set by a dropdown? Filter? VLookup? Query? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 years ago.
Improve this question
https://docs.google.com/spreadsheets/d/1mvBFBuRUl2qiPktE1Y4lCTeaSK4BwJ7S4Nf0S33LTRg/edit?usp=sharing
On Sheet2 I am wanting to show all the columns associated with a specific string that comes from a dropdown data validation. I have tried using VLOOKUP but that only outputs the first entry found, I want to print every entry along the row.
I put an example of what I am trying to get it to look like but not sure if VLOOKUP or QUERY or FILTER or something else is what I need
In your example spreadsheet, sheet 2, delete everything in the range F3:I and then enter in F3
=query(A:D, "where D='"&F2&"'",1)
If you want to reference the data on the sheet you'll have to use
=query('Draft Board'!A:D, "where D='"&F2&"'",1)
See if that works ?

Resources