Using REGEXREPLACE to insert commas into values in Google Sheets - google-sheets

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.

Related

Google Sheets - Use UNIQUE function and display as a row [duplicate]

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))

Google Sheets - Use UNIQUE function and display as a row

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))

Google Sheets conditional formatting with formula

Here is the link to my google sheet:
https://docs.google.com/spreadsheets/d/1toBfSTFwIzlUOVZrWWjmhIOZizXuiJ091dYN70kZHcA/edit?usp=sharing
I am trying to create conditional formatting based on a range of dates which does not seem to be working.
This is my formula:
=isnumber(vlookup(C12,$K$60:$K$71,1,0))
I used =isnumber because of the date issue. The problem is that only the first cell of the cells selected to be conditionally formatted is changing color which I know is incorrect because the first cell does not even have a date number.
What am I doing wrong?
try like this:
=VLOOKUP(C11, FILTER($K$60:$K$71, $K$60:$K$71<>""), 1, )*(ISNUMBER(C11))
or even:
=VLOOKUP(C11, $K$60:$K$71, 1, )*(ISNUMBER(C11))

Trying to get Formula for Google sheet

I'm looking to create a formula that converts a column of strings (If a string is available) into a larger string. See the google spreadsheet example in the attached.
Is this possible? Please help me make a formula.
Column A to E is the input, Column H should contain the formula that displays the expected result.
https://docs.google.com/spreadsheets/d/1bOMkEgzhyoZHNv2Z9dCQ7qcDGb36CTN9fnMo9wJ7cqU/edit?usp=sharing
There's a new tab on your sheet with this formula in h1.
=ARRAYFORMULA({"Output";IF(A2:A="",,SUBSTITUTE(A2:A," ","_")&" = "&IF(B2:B="","['"&A2:A&"']","['"&TRANSPOSE(SUBSTITUTE(TRIM(QUERY(TRANSPOSE(A2:G&CHAR(10)),,7)),CHAR(10)&" ","', '"))&"']"))})
Does that work?

Google Sheets Query: Bring data by date in cell

I am trying to query a google sheet by date. I have done some research and learned I need to convert to TEXT format so that I can run the comparison, but I am not able to get the syntax correctly:
=query('SheetName'!$A2:$S, "select A Where O=date'"&TEXT(B2,"yyyy-mm-dd")&)
Could you give me some guidance?
Some more info: in my query, B2 is a valid date in date format. Column O has some cells that are text strings and others that are valid dates; I have set the format of the entire column to "Date".
Here is a link to a simple example, feel free to play around with the query: https://docs.google.com/spreadsheets/d/1O4ms9ufvZ_CRLl_LG45hksjRoOJtv0XexbfjCLqFW4I/edit?usp=sharing
See if this works?
=filter('SheetName'!A3:A, 'SheetName'!O3:O=B2)
correct syntax should be:
=ARRAYFORMULA(QUERY(TO_TEXT(SheetName!$A2:$S),
"select Col16 where Col15 = '"&TO_TEXT(DATEVALUE(B2))&"'"))

Resources