I want to join the text but the number of rows differ for each record. If I use the static range data is missing for few records, in below example 22Inch is missing,
Used the below formula. How to dynamically change the range.
=TEXTJOIN(",",TRUE,A3:A8,"")
try:
=TEXTJOIN(",", 1, A3:INDEX(A:A, MIN(IFERROR(1/(1/(ROW(A3:A)*(A3:A="")))))))
Can you test this one out:
=LAMBDA(z,BYROW(z,LAMBDA(a,REGEXREPLACE(TEXTJOIN(",",1,IFNA(FILTER(A2:A,XLOOKUP(ROW(B2:B),z,z,,-1)=a))),"^(.*?)\,",""))))({ROW();BYROW(A3:A,LAMBDA(z,IF((z<>"")*(OFFSET(z,-1,0)=""),ROW(z),)))})
Here's another formula you can try:
=QUERY(INDEX(LAMBDA(ζ,SORT(REGEXREPLACE(ζ,"^,",),COUNTIFS(A1:A,"",ROW(A1:A),"<="&ROW(A1:A)),1,LEN(ζ),))({"";IF({A3:A;""}<>"",,SCAN(,A2:A,LAMBDA(a,c,IF(c="",,a&","&c))))})),"limit "&ROWS(A2:A))
I would like create a new sheet in my document and combine all values in Products sheet from column A (from A2) into one on the new sheet, when Current Stock (calculated) is greater than 1 (preferably only non blank cells):
Currently I am using formula:
=JOIN(";",Products!A2:A,"")
How can I add here check for Current Stock?
Try-
=JOIN(";",FILTER(Products!A2:A,Products!H2:H>0))
H2:H>0 will filter out non blank number values cells.
Try
=JOIN(";",FILTER(Products!A2:A,LEN(Products!H2:H)))
the condition is for lenght > 0, you can modify with what you want.
Bye
In google sheets, using UNIQUE on a column causes all of the unique values to be displayed in a column.
Is there a way to have all of the values displayed in a row instead of a column?
You can use this:
=TRANSPOSE(UNIQUE(E1:E7))
(Do adjust the formula according to your ranges and locale)
Functions used:
TRANSPOSE
UNIQUE
try this:
=UNIQUE(FLATTEN(A1:D1))
How do I go about using REGEXREPLACE to insert commas into values in Google Sheets? Example:
cell A1 = 1234567890
expected output in B1 = 1,234,567,890
edit:
The intention would be so that the user would not need to format anything themselves. This issue is from a template I'm doing up, sample sheet here - https://docs.google.com/spreadsheets/d/1n-KXqcSpx_DpvrOv9A4UsKn1amGGEUCpyzWWDphWdJY/edit?usp=sharing
try:
=TEXT(A1; "#,###,###,##0")
Try
=A1
and change the format to
#,##0
To insert commas into values in Google Sheets, I recommend:
Select the range of cells you'd like to format or modify.
Click Format and then Number.
Select the format to apply to the range of cells.
E.g. I have the following sheet and formula, but I only want to transpose the data if it contains a specific month, specified in A2.
try:
=TRANSPOSE(UNIQUE(FILTER(A5:A; B5:B=A2)))
You can use a query for that.
=TRANSPOSE(QUERY(A5:C, "select A where month(B)+2="&MONTH(A2)&""))
The reason we add +1 is because months in a query start from 0