apply indirect arrayformula to the entire column in gsheet - google-sheets

I get address of non-null cells from the formula below.
=arrayformula(if(A2:A="","",ArrayFormula(address(1,(mmult(isnumber(find("",A2:O99999))*1,sign(row(1:15))))))))
And I want values at the address I get from the formula.
What should I add to the formula to get those values?
I want to insert the formula to "laststatus"
id
laststatus
...
statusA
statusB
statusC
A
statusC
...
done
done
done
B
statusA
...
done
C
statusB
...
done
done
D
statusC
...
done
done
done
Thanks.

You can use this formula:
=ARRAYFORMULA(REGEXEXTRACT(TRANSPOSE(QUERY(TRANSPOSE("|"&IF(C2:E5="done",$C$1:$E$1, "")),,COLUMNS(C2:E5))),"([^|]*)[|\s]*$"))
Output:
Reference:
https://stackoverflow.com/a/72698323/17842569

use:
=INDEX(REGEXEXTRACT(FLATTEN(QUERY(TRANSPOSE("×"&
IF(D2:F="done", D1:F1, )),,9^9)),"([^×]*)[×\s]*$"))

Related

How to make this formula shorter in google sheets

I would like to know what product I exactly have with this sheet. So I add in column O for help. However, my formula seems to be too long to maintain in the future, and it will always have a "/" in the end.
This is my formula in O2
=if(isblank($A2),,$A$1&"/")& if(isblank($B2),,$B$1&"/")& if(isblank($C2),,$C$1&"/")& if(isblank($D2),,$D$1&"/")& if(isblank($E2),,$E$1&"/")& if(isblank($F2),,$F$1&"/")& if(isblank($G2),,$G$1&"/")& if(isblank($H2),,$H$1&"/")& if(isblank($I2),,$I$1&"/")& if(isblank($J2),,$J$1&"/")& if(isblank($K2),,$K$1&"/")& if(isblank($L2),,$L$1&"/")& if(isblank($M2),,$M$1&"/")&
How could I improve this forluma? Thanks!
You need TEXTJOIN() and FILTER() function.
=TEXTJOIN("/",1,FILTER($A$1:$N$1,A2:N2=1))
to process the whole array at one use:
=IFERROR(BYROW(A2:N, LAMBDA(x, TEXTJOIN("/", 1, FILTER(A1:N1, x<>"")))))

Google sheet Array Function auto fill

Hello i am trying to make google sheet array function to auto fill formula in case of Column C
have any value Like a,b,c, Etc i have try this but its not work
=arrayformula(IF(C2:C="","",F1-D2:D+E2:E))
First solution
in F1
=arrayformula(E1:E-D1:D)
in G1
=arrayformula(SUMIF(ROW(D1:D),"<="&ROW(D1:D),F1:F))
other solution, in F1
=arrayformula(mmult(1*(transpose(row(D1:D))<=row(D1:D)),E1:E-D1:D))
MMULT
Try This !
=ArrayFormula(IF(C2:C="",,INDIRECT("F1:F"&ROWS(F:F)-1)-D2:D+E2:E))

Google Sheets : How to convert cell address to text/string?

I want to change the cell address to string/text. For example :
AB123 --> "AB123"
I want to use it with indirect(), for example to refer to A1:A100 where the '100' is fetched from cell X1 -->
indirect( to_string( A1 ) & ":A" & X1 )
I didn't do indirect("A1:A"&X1) because since "A1" is static string so when i insert a new row on the very top so to shift down row 1, then the formula won't update automatically and will still refer to A1:A100 , in fact it should now refer to A2:A100 after the row insert. In this case i want to keep the A1 not as string so after insert it should updated to A2
What is the simplest way to do it?
Try this:
=cell("address", AB123)
This (or something like it) might also work instead of all that "indirect" stuff.
OFFSET is very good at defining changing ranges like that.
=OFFSET(A2,,,X1,1)
try:
=INDIRECT(ADDRESS(123, COLUMN(AB1)))
or:
=INDIRECT(ADDRESS(123, 28))
to get range AB123

google sheet : insert blank column in query output

I tried to extract some column from master table/sheet. I can use query() or filter() or vlookup() but for this example, i use this very simple formula in cell A100 :
={ calc_01!C15:C ,calc_01!F15:F }
It works fine and it will just output 2 columns in A and B column (start from row 100).
The problem is : how if i want the output into 3 column (A,B,C) where the 2nd column or column B will be empty. So i tried something like this , trying to make the 2nd column blank :
={ calc_01!C15:C ,"",calc_01!F15:F }
If i put it on cell A100, i expect the output will occupy column A,B and C (where B is blank). But it doesn't work. So does anyone know if possible to do it ?
Why i want to do this? because i have condition where on the top i have some kind of table formatting where the B column is too narrow and i'm not allowed to adjust its width, so i have to use column c instead of B.
Thanks.
Try
=index({ 'calc_01'!C15:C ,if(row('calc_01'!C15:C),,),'calc_01'!F15:F })
and see if that works?

Google Sheets: Print output in another cell

If I use the formula: =UNIQUE(A1:A9) on the B1 cell, the column B will be filled with the unique appearances from A1 to A9. In other words: it will remove duplicates.
The problem is that if I want to order from A to Z of the column C, the formula will be moved to some other place, so it will stop working.
My workaround so far has been this:
However, you will be agree that it's not the most elegant solution.
I'd like to know if it's possible to use a formula in Z1 to print the output starting from Z3.
Is that possible?
I'd like to know if it's possible to use a formula in Z1 to print the output starting from Z3.
use in Z1:
={""; ""; UNIQUE(I3:I313)}

Resources