I want to split text in column:
This is link to my spreadsheet:
https://docs.google.com/spreadsheets/d/1uSgHy_RR2Yk30eP0zq-K9W2f4_JgcuiEMDHGA-yQrRg/edit?usp=sharing
Try below formula. See you google-sheet.
=QUERY(ArrayFormula(SPLIT(FLATTEN(SPLIT(A2:A4,", ")&"#"&B2:B4&"#"&C2:C4),"#")),"where Col3 is not null")
Related
I would like to pull data from Google Sheets form responses that include checkboxes. The checkboxes are output into single column cells by commas.
Data/Form Responses sheet:
enter image description here
Current and Expected Results
enter image description here
Current Formula
=ARRAYFORMULA(TRIM(QUERY(SPLIT(FLATTEN(IF(IFERROR(SPLIT('Form Responses'!E2:E, ","))="",,
'Form Responses'!B2:B&"×"&SPLIT('Form Responses'!E2:E, ","))), "×"),
"where Col2 is not null")))
If anyone could please help I would appreciate it!
SUGGESTION
Perhaps you can try this tweaked formula:
=ARRAYFORMULA(TRIM(QUERY(SPLIT(FLATTEN(IF(IFERROR(SPLIT('Form Responses'!E2:E, ","))="",,TEXT('Form Responses'!A2:A,"MM/DD/YYYY HH:MM:SS")&"×"&'Form Responses'!B2:B&"×"&'Form Responses'!C2:C&"×"&'Form Responses'!D2:D&"×"&SPLIT('Form Responses'!E2:E, ","))),"×"),"where Col2 is not null")))
Demo
You may try this LAMBDA() formula. You just need to adjust ranges in lambda input parameter.
=LAMBDA(UnpivotCol,AdjucentCols,QUERY(REDUCE(,REDUCE(,UnpivotCol,LAMBDA(a,x,VSTACK(a,TOCOL(INDEX(JOIN("|",INDEX(AdjucentCols,ROW(x)-(INDEX(ROW(UnpivotCol),1)-1))) & "|" & SPLIT(x,",")))))),LAMBDA(t,g,VSTACK(t,SPLIT(g,"|")))),"offset 2 format Col1 'm/d/yyyy'",0))(E2:E4,A2:D4)
Is there a way to get the result column in the picture below?
All i want to do is text join the Col1 if the corresponding Col2 belongs to the same groups (E.G. 1,2,3....).
Reminded that I want to use arrayformula instead of dragging down the "normal" formula myself everytime.
Use this formula
Or Make a copy of this example sheet.
=ArrayFormula({"Result";
IF(A2:A="",,
BYROW(B2:B,
LAMBDA(v,JOIN(", ",FILTER(A2:A,B2:B=v)))))})
Great news for google-sheet lovers that google releases new lambda formulas. You can use BYROW() function to make it spill array. Try below formula.
=BYROW(C3:C9,LAMBDA(x,JOIN(",",FILTER(B3:B9,C3:C9=x))))
To refer entire column use FILTER() function for BYROW().
=BYROW(FILTER(C3:C,C3:C<>""),LAMBDA(x,JOIN(",",FILTER(B3:B,C3:C=x))))
Suppose my range of data from B3:C9, want to group the result according the the Column C (or Col2)
Here is the formula i googled without using the Lambda function
=ARRAYFORMULA(REGEXREPLACE(TRIM(SPLIT(FLATTEN( QUERY(QUERY({ROW(C3:C9), C3:C9&"×", B3:B9&","}, "select max(Col3) where not Col2 starts with '×' group by Col1 pivot Col2"),,7^7)), "×")), ",$", ))
Notice the 7^7 is the (length of the data)^(length of the data).
i.e. from 3 to 9, there are 7 data.
I'm trying to trim this rows horizontaly and then transpose the values in two columns with this formula:
=FILTER(7:8, TRIM(FLATTEN(QUERY(TRANSPOSE(7:8),,9^9)))<>"") But it looks like it don't do anything. Here is the data:
Help with this please
The following formula should produce the behaviour you want:
=QUERY(TRANSPOSE(7:8),"select * where Col1 is not null")
Can try FILTER() function.
=TRANSPOSE(FILTER(A7:I8,A7:I7<>""))
Also could use QUERY() like-
=QUERY(TRANSPOSE(A7:J8),"where Col1 is not null",0)
I have some simple data in the following format:
I need to make a sum of the last column, but based on the text in Domain column. The resulting table should be like this...given the text filtering needed, I'm not using pivot tables.
To do this, for July Domain 1 for example, I have a formula like this:
=SUMIFS(C:C, MONTH(A:A), 7, B:B, "domain1.")
And for the rest of the domains:
=SUMIFS(C:C, MONTH(A:A), 7, B:B, "<>domain1.")
I am using SUMIFS because I need the multiple conditionals. But this formula above gives an error:
Error: Array arguments to SUMIFS are of different size.
The columns are all structured as A:A, B:B, etc. What is going wrong?
Thanks.
MONTH(A:A)
will output only one cell unless you wrap your formula into INDEX or ARRAYFORMULA:
=INDEX(SUMIFS(C:C, MONTH(A:A), 7, B:B, "<>domain1.*"))
=ARRAYFORMULA(QUERY({TEXT(A2:A, "mmmm"), B2:C},
"select Col1,sum(Col3)
where not Col2 contains 'domain1.'
and Col3 is not null
group by Col1
label sum(Col3)''"))
Is it possible to write a query (inside a formula) that references non-adjacent (discontinuous, discontiguous, I don't know the proper phrase) ranges? For instance: =query(A2:C,E2:F,"Select Col2 where Col5=3")
I want to be able to put my query in Column D, so I wanted to split the range around it. If I just say "Query(A2:F..." it will detect circular dependency when the equation is in Column D.
If it helps, I have shared a spreadsheet with an example (highlighted in yellow):
Try:
=query({A2:C,E2:F},"Select Col2 where Col5=3")
or if you don't want the label use:
=query({A2:C,E2:F},"Select Col2 where Col5=3 label Col2 ''")
#Pawel Szczur
Have you tried your formula with "\"?
=QUERY({s1!F1:F12115\s1!AH1:AH12115}, "SELECT Col1,Col2")