How can I prevent users from entering non-alphanumeric characters in a Google Sheet - google-sheets

I tried using the Data Validation on the column H by applying the custom formula: =REGEXMATCH(H1, "^[a-zA-Z0-9]+$"); but to no avail, Google Sheets tells me that this formula is invalid.
Back in 2020 it worked. Did Google change something?

From the screenshot it looks like the sheet locale uses semicolon ; convention instead of ,
go with =REGEXMATCH(A1; "^[a-zA-Z0-9]+$")

Related

Why do certain formulas in google sheets not work when a google form is linked in the same document?

I have a google form linked document with 2 sheets (1 with a linked form, 1 without). If I try using some formulas (SUMIF or QUERY) in the sheet that is not linked I get a "Formula parse error", additionally the syntax highlighting bugs out when typing a SUMIF formula.
For reference, this is the exact sheet and formula I am trying:
However, If I copy and paste the exact contents of this sheet to another google sheets document, then the SUMIF just works. Does having a google form linked sheet in the same document affect the other sheets?
you sheet has non-english locale therefore you need to use semicolon ; instead of commas , in formula syntaxes
if you use ; in non-english sheets = all is ok
if you use ; in english sheets = all is ok - all ; are autocorrected into ,
if you use , in english sheets = all is ok
if you use , in non-english sheets = you got a syntax error
also keep in mind that arrays {} have its own syntax universe...
in english sheets you use , to stack stuff next to each other
in english sheets you use ; to stack stuff under each other
in non-english sheets you use \ to stack stuff next to each other
in non-english sheets you use ; to stack stuff under each other
anyway, if you are not sure what to use either check the settings or you can take a hint from the formula tooltip helper box:

google sheets : Formula works differently than usual

Hi today i got a document shared by my friends. I've just found out that this document/spreadsheet doesn't work as normally. Some formula just doesn't work here.
for example , normally if i use :
={1,2,3}
it should normally create a row with 3 columns (3 cells each contains 1,2,3 respectively).
But in this document , i got : "formula parse error"
Also found out that when i try to use some formulas , for example the filter(), the help/documentation shows something really different.Pls check my screenshot, normally it uses comma (,) separator while this document using semicolon (;). I'm confused what is wrong ? I'm suspecting that this maybe about google sheet versioning. Am i correct ? or something else ?
If yes, how can i convert this old version document into the latest one ?
Thanks.
your sheet is not US-based, therefore you need to use:
={1\2\3}
ENGLISH SHEETS NON-ENGLISH SHEETS
ROW ARRAY , \
COLUMN ARRAY ; ;
FX ARGUMENT SEPARATOR , ;
language of the spreadsheet can be found in the settings:

Replace everything after specific character in google sheets

So I have a document with 30k+ emails. The probleme is, during the export random characters appeared after the emails, something like name#email.com2019-10-10T0545152019-10-10T054515f or name#email.com00000000000700392019-11-28T070033f
My question is, how do i remove everything after ".com" or ".fr" in all the cells ?
You could try using REGEXREPLACE.
=REGEXREPLACE(A1,"\.com.*|\.fr.*", "")
Try
=REGEXEXTRACT(A1,".+\.com|.+\.fr")
Working from what other people added, you can get all emails from the column A and use regular expressions to get the values. Using ARRAYFORMULA you can do it in a single formula:
=ARRAYFORMULA(IF(A:A<>""; REGEXEXTRACT(A:A; ".+\.(?:com|fr)"); ""))
Rundown
ARRAYFORMULA allows to execute the formula to the entire column
REGEXEXTRACT extracts part of the string using regular expressions
IF conditional. In this case it's used to no execute when the cell is empty, preventing an error.
References
ARRAYFORMULA (Docs Editor Help)
REGEXEXTRACT (Docs Editor Help)
IF (Docs Editor Help)
Supposing your raw-data email list were in A2:A, try this in, Row 2 of an otherwise empty column (e.g., B2):
=ArrayFormula(IF(A2:A="",,REGEXEXTRACT(A2:A,"^.+\.\D+")))
In plain English, this means "Extract everything up to the last dot found that is followed by some number of non-digits."
This should pull up to any suffix (e.g., .com, .co, .biz, .org, .ma.gov, etc.).

Search for string with VLOOKUP in Google Sheets

Trying to find a particular string in a google sheet column (column A) and return the value of the cell directly to the right (column B). If tried the following, but keep getting a Formula parse error. Please advise:
=VLOOKUP(“Assessment Guide - AWG”, A16:B120,2,FALSE)
That formula looks right to me, but if you could take a screenshot of how you wrote the formula that would be helpful. Usually formula parsing issues happen when you use a semicolon instead of a comma or have an extra parenthesis or a quote in the wrong place.

Google spreadsheet googlefinance get specific attribute does not work

The googlefinance integration, documented here, in google spreadsheets does not seem to work for me:
Example:
GOOGLEFINANCE("GOOG","price",TODAY()-30,TODAY())
Google spreadsheets gives the cell a red corner and prints the following message:
Fel i formeltolkning. which in english means something along the lines of Error in formatting.
The following does however work: =GOOGLEFINANCE("GOOG").
Also I can open other spreadsheets from links where the exakt same syntax seem to work. What can cause this?
Change comma to a semicolon.
GOOGLEFINANCE("GOOG";"price";TODAY()-30;TODAY())
Some regions (Norway!) use a comma for decimals. The other option is to change settings:
File > Spreadsheet Settings > Locale...

Resources