I have a result range of a query formula with rows and columns
I need to append text "MQ" to first column only
How do I make it possible? I tried =Arrayformula("MQ " & QUERYFORMULA )
Try
=ArrayFormula({"MQ",""}&query(A1:B2))
Related
I'm new to google sheet. I have a column(E) with the date and another with a session(F), I want to merge them into one column with each date & different session just like the first few rows in column C.
I've tried "=ArrayFormula(concat(D2:D,concat(" ",F2:F5)))" in column C but only got the first date.
use:
=INDEX(QUERY(FLATTEN(FILTER(E2:E, E2:E<>"")&" "&
TRANSPOSE(FILTER(F2:F, F2:F<>""))), "where not Col1 starts with ' '", ))
see: https://stackoverflow.com/a/68775825/5632629
In your cell C1, try this formula:
=ArrayFormula(E1:E&" "&F1:F)
Well you can simply do concatenate cells like this:
CONCATENATE(E1, " ", F1)
to get what you want I think.
What you're looking for is a cartesian product. I don't have a single formula that does the entire thing for you, but I can suggest a two-step approach.
Get the cartesian product with this formula:
=ARRAYFORMULA(SPLIT(FLATTEN(E2:E9 & "|" & TRANSPOSE(F2:F5)), "|"))
This gives a pair of each date against each time in two result columns. You can then concatenate each row of them in a final result column.
I have 1 column with 600 entries where I need to move, to a new column, only those entries which has a keyword "test" in them, but not exact match. Looking for a Google Sheets formula, Excel works as well.
Assuming your column is A, try
=query(A:A,"where A like '%test%' ")
or:
=FILTER(A:A; A:A="test")
I would like to transfert a table to another range with ArrayFormula and set only one column to %.
If I change the format it will return 4500%, but I just want 45%.
View.jpg
Link to the file: https://docs.google.com/spreadsheets/d/1eKRlcJwThbFhlk1LJB23qbhsenvJ2q5fqDGZksOGhOs/edit#gid=0
try:
=ARRAYFORMULA(TEXT(A1:C8; {"#"\"#"\"0\%"}))
or:
=INDEX({A1:B8\ {C1; C2:C8%}})
I'd like to achieve what's in the Desired Output column in the image below. I need to take what's in row 1 (id1, id2, etc.), add ":" to that, then concatenate it with the values under each of the Field columns, add "|" to each ID-Value pair, and get that all together into one cell. I need the formula to also work for empty cells, as the number of fields to concatenate together is dynamic.
So far I've tried a big CONCATENATE formula in one cell, but I can only get it to work for as many non-blank cells as I include in the formula.
Thanks in advance!
google-sheets
Use JOIN:
=arrayformula(join("|",filter($B$1:$E$1& ":" & B2:E2,B2:E2<>"")))
excel-formula
Use TEXTJOIN
=TEXTJOIN("|",,IF(B2:E2<>"",$B$1:$E$1 & ":" & B2:E2,""))
This will be an array formula and must be confirmed with ctrl-Shift-Enter instead of Enter when exiting edit mode.
Im trying to copy this formula
= INDEX(myrows, MATCH(B3 & "/Fashion Men",mycolumn,0) )
to the whole column.
WORKING OF THIS FORMULA:
(this formula looks for value in given cell(B3 in this case) and concatenates with "/men" and searches it in range "mycolumn" and then after finding it, it gives that cell's row . so the final output is a single row present in range myrows)
I've tried the following but it only prints out a single row and doesn't goes down to read the values of B4 and so on.
=ARRAYFORMULA( INDEX(myrows, MATCH(B3:B & "/Fashion Men",mycolumn,0) ) )
You can try something like this instead:
= ArrayFormula(IFERROR(VLOOKUP(B3:B& "/Fashion Men",{mycolumn,myrows},{1,2,3,4},0)))
You will need to update the {1,2,3,4} array to match the column numbers in the myrows range that you want to return