SPLIT EACH WORD IN NEW ROW - google-sheets

I used this formula to split each word in diffirent row:
=ARRAYFORMULA(TRIM(QUERY(SPLIT(FLATTEN(
IF(Sheet1!A2:B6000="",,Sheet1!A2:A6000&"×"&SPLIT(Sheet1!B2:B6000, " "))), "×"),
)))
but it is working only for the firs tow word in each cell in column A
How i can update this formula to split all words?
Here is the sheet sample:
https://docs.google.com/spreadsheets/d/1wi5neSYC_lb6nRXDRYxMk7tLWCoBpy2VSx7ejXt9yXI/edit?usp=sharing
this the image

added formula to your sheet:
=QUERY(INDEX(SPLIT(FLATTEN(A2:A100&"|"&BYROW(B2:B100,LAMBDA(bx,SPLIT(bx," ")))),"|",0,0)),"SELECT * WHERE Col2!=''")

Related

Arrayformula to return last non-empty cell in multiple rows

I need help formulating an arrayformula on how to return the last non-empty cell in a row across multiple rows.
The formula will be in column A in cell A2 and the output will look like this in column A:
The formula I have is only for 1 row. I need the formula (only 1 formula) to return the last non-empty cells of 1000+ rows.
This is the current formula I have but it's only for 1 row. I need to drag it down every time I add a new row:
=LOOKUP(1, ARRAYFORMULA(1/(B2:Z2<>"")),B2:Z2)
Is there an arrayformula that can do this across multiple rows without dragging down the formula?
any help would be appreciated. Thank you very much.
try:
=INDEX(REGEXREPLACE(TRIM(FLATTEN(QUERY(TRANSPOSE(
SUBSTITUTE(B2:Z, " ", CHAR(13))),,9^9))), ".* ", ))

How to use filter with ArrayFormula?

Im trying to use array formula to list multiple "rows" without the blank cells not from another area in the sheet.
=ArrayFormula(IFERROR(FILTER(GE2:HQ2,LEN(GE2:HQ2)),""))
Also tried
=ArrayFormula(IFERROR(FILTER(GE2:HQ,LEN(GE2:HQ)),""))
Neither returns an array effect. Also tried dragging down the formula to expand the whole sheet. Which works, until a form is submitted. Then the cell in that row loses its formula
Link to an example Sheet
https://docs.google.com/spreadsheets/d/e/2PACX-1vSl8Olx8fYsgROoCU6xLq4M53liT16DgEgtw1RAt0uqpWPosUGZ6aXjBP5UF5pS6y0ZBwAF-8pZrjZR/pubhtml
Any advice would be appreciated
use:
=INDEX(SPLIT(FLATTEN(QUERY(TRANSPOSE(A2:G4),,9^9)), " "))
if dataset contains words in cells use:
=INDEX(SUBSTITUTE(SPLIT(FLATTEN(QUERY(TRANSPOSE(
SUBSTITUTE(A2:G4, " ", "♥")),,9^9)), " "), "♥", " "))

how to reshape input dataset with formula

I want to work the following. I am using this formula
=ARRAYFORMULA(Split(Transpose(Split(Query(Transpose(query(transpose(if(Input!B2:I<>"", ";"&Input!A2:A&"\"&Input!B2:I, )) ,,999^99)),,999^99), ";")), "\"))
but it does not give the desired results. Here is the desired output 'Automatically restructure all data from input tab as "Example Output" tab illustrates
No rows for "blank" cells in the input tab
Use formula(s) only in the first row - i.e. no need to drag cells down the entire sheet, and this tab auto-updates when new entry made in Input tab"
get the sheets on this link
and give ideas on how to improve the formula or insights into how you can do it differently
=QUERY({Input!A2:C;
Input!A2:A, Input!D2:E;
Input!A2:A, Input!F2:G;
Input!A2:A, Input!H2:I;
Input!A2:A, Input!J2:K}, "where Col3 is not null", 0)
=ARRAYFORMULA(QUERY(SPLIT(TRANSPOSE(SPLIT(QUERY(TRANSPOSE(
QUERY(TRANSPOSE(IF(LEN(Input!A2:A),
"♦"&Input!A2:A&"♥"&Input!B2:B&"♥"&Input!C2:C&
"♦"&Input!A2:A&"♥"&Input!D2:D&"♥"&Input!E2:E&
"♦"&Input!A2:A&"♥"&Input!F2:F&"♥"&Input!G2:G&
"♦"&Input!A2:A&"♥"&Input!H2:H&"♥"&Input!I2:I&
"♦"&Input!A2:A&"♥"&Input!J2:J&"♥"&Input!K2:K, ))
,,999^99)),,999^99), "♦")), "♥"), "where Col3 is not null", 0))

Make Sheets Enter Row Number into a Designated Cell

In Google Sheets, if I write "Jeff" in a cell on Row "X", how do I get "X" (row number where I wrote "Jeff") to be entered into a cell on row "Jeff" on another sheet.
Sorry if this is a weird request, I have some experience with Excel Macros but I can't figure this out
The Sheet with the yellow highlight is what I want to manually enter, the Sheet with the blue highlight is what I want the code to make for me
Input:
Result:
this is how you get a list of names with rows:
=ARRAYFORMULA(QUERY(TO_TEXT(SPLIT(TRANSPOSE(SPLIT(QUERY(TRANSPOSE(QUERY(TRANSPOSE(
"♠"&B1:E&"♦"&ROW(A1:A)),,999^99)),,999^99), "♠")), "♦")),
"where Col2 is not null", 0))

How do I reference one cell created in ARRAYFORMULA from another?

Let's say I'm using ARRAYFORMULA to generate values (whitespace is for readability):
=ARRAYFORMULA({
Sheet1!A1:C,
Sheet1!A1:A * Sheet1:B1:B,
Sheet1!A1:A * Sheet1:B1:B + Sheet1!C1:C
})
The first 3 cells are directly from Sheet1.
The 4th cell is a formula using the values from the first 2 cells.
The 5th cell is a formula using the value from that 4th cell, and then adding the 3rd cell.
Instead of needing to re-calculate the 4th cell in the 5th cell, is there a way to reference the result of the 4th cell in the 5th cell?
No, there is no way to reference a column of virtual array {} within the same array. Two workarounds are:
Create the column A*B+C using a second array formula, which references the output of the first
or,
Wrap the output of arrayformula in a query which can reference the columns as Col1, Col2, ...
Example:
=query(arrayformula({A1:C, A1:A*B1:B}), "select Col1, Col2, Col3, Col4, Col4+Col3 label Col4+Col3 ''", 0)

Resources