I need help creating a Google Sheets formula that can transform special characters with accents into regular ASCII letters.
I know that Google Sheets uses RE2 for its REGEXREPLACE function and RE2 supports Unicode character classes. I attempted to create a formula like this:
REGEXREPLACE("café","(\pL)\pM*","$1")
However, Google Sheets returns an error saying that “\pL” is not a valid regular expression pattern.
I could potentially use multiple nested SUBSTITUTE functions to replace each accented character individually, but that approach would be very messy and long.
Does anyone know a cleaner method to convert Unicode letters with accent marks to their basic ASCII equivalents using Google Sheets formulas?
the normalize approach works well but can break on weird edge cases. I’ve had better luck using char and code functions with basic ascii math. it’s not as elegant but handles common accents like é, ñ, ü reliably. worth trying if normalize gives you issues.
Been wrestling with this exact problem for months with customer data from different countries. Unicode property classes like \pL don’t work in Google Sheets regex, which sucks. What saved me was combining NORMALIZE with REGEXREPLACE. Try this: =REGEXREPLACE(NORMALIZE(A1,NFD),"[\u0300-\u036f]",""). NORMALIZE breaks characters into base letters plus combining marks, then REGEXREPLACE strips the diacritical marks. Works perfectly - café becomes cafe, naïve becomes naive, etc. Way cleaner than endless SUBSTITUTE chains and handles tons more characters than you’d think.
Google Sheets has a CLEAN() function for non-printable characters, but it won’t help with accents. I’ve run into this same problem with multilingual data. Best trick I found? Use GOOGLETRANSLATE with this formula: =GOOGLETRANSLATE(GOOGLETRANSLATE(A1,"auto","ascii"),"auto","en"). It’s not bulletproof but handles most accented characters well. If you’re dealing with tons of international text, write a custom Google Apps Script using the normalize() method. Takes longer to set up but you’ll get way more control over the conversion.