TRANSLATE and DETECTLANGUAGE in Excel: Translate Text With Formulas

Isometric spreadsheet illustration showing TRANSLATE in Excel converting text across languages

Reviewing international customer support tickets, localized product catalogs, or survey responses in Excel used to require copying text into a browser translator cell by cell. With TRANSLATE in Excel and its companion function DETECTLANGUAGE, you can identify unknown languages and translate text across supported languages directly inside worksheet formulas.

Availability & Caveats: Per the official TRANSLATE function documentation and DETECTLANGUAGE function documentation, both are service-backed functions powered by Microsoft Translation Services. They require an active internet connection and a Microsoft 365 subscription (Excel for Microsoft 365 on Windows and Mac, Excel for the web, and Excel Mobile). Perpetual releases such as Excel 2024, Excel 2021, and LibreOffice Calc do not include these functions and will display #NAME?; Google Sheets offers GOOGLETRANSLATE and DETECTLANGUAGE instead.

How TRANSLATE in Excel Works (Syntax & Language Codes)

TRANSLATE sends text to Microsoft Translation Services and returns the translated string inside the formula cell. Here is the complete syntax:

=TRANSLATE(text, [source_language], [target_language])
  • text (Required): The text string (in quotes) or cell reference containing the text you want to translate. Numeric or non-text values return an error.
  • [source_language] (Optional): The ISO language code of the input text (such as "en" for English or "es" for Spanish). If omitted, Excel auto-detects the source language—though Microsoft recommends specifying it when translating very short phrases.
  • [target_language] (Optional): The ISO language code you want to translate into. If omitted, Excel defaults to your current system language.

Suppose your Practice sheet tracks six global support tickets in A6:C11, with Customer Message in Column B and a Target Code in Column C. To translate cell B6 ("Hola mundo! Necesito ayuda con mi factura.") into English using automatic source detection, enter:

=TRANSLATE(B6, , "en")

When you already know the source language—for example, translating English cell B11 into Spanish—specify both codes for faster, more accurate results: =TRANSLATE(B11, "en", "es").

How DETECTLANGUAGE Works (Identify Unknown Languages)

Before routing tickets to regional teams or running conditional counts, you often need to know which language each row is written in. DETECTLANGUAGE takes a single argument—a text cell or range—and returns the corresponding ISO language code:

=DETECTLANGUAGE(text)

Entering =DETECTLANGUAGE(B6) in cell D6 returns "es" for Spanish, while =DETECTLANGUAGE(B7) returns "fr" for French. You can then feed that detected code straight into TRANSLATE (=TRANSLATE(B6, D6, C6)) or split multi-part translated phrases across columns using TEXTSPLIT in Excel.

Excel TRANSLATE vs. Google Sheets GOOGLETRANSLATE

If you collaborate across Microsoft 365 and Google Workspace, note how formula names and behavior differ between platforms:

TaskMicrosoft Excel (M365)Google SheetsOffline / Perpetual Excel?
Translate Text=TRANSLATE(B6, "es", "en")=GOOGLETRANSLATE(B6, "es", "en")No (requires cloud service)
Auto-Detect SourceOmit source_languagePass "auto" as sourceNo
Detect Language Code=DETECTLANGUAGE(B6)=DETECTLANGUAGE(B6)No
Daily Quota LimitYes (Request Throttled)Yes (rate-limited)N/A

Troubleshooting Common Translation Errors

  • Error in Value (#VALUE!): Per Microsoft Support, TRANSLATE and DETECTLANGUAGE only accept text arguments. Passing a pure number or date triggers a value error—wrap formulas in IFERROR or check our guide on how to fix the #VALUE! error in Excel.
  • Text Too Long: A single cell exceeds the character limit accepted by Microsoft Translation Services. Split long paragraphs into smaller cells before translating.
  • Invalid Language: One of your source_language or target_language codes is misspelled or unsupported (always use valid ISO codes like "en", "es", "fr", or "de").
  • Request Throttled: You have exceeded your daily quota for the translation service. Avoid wrapping thousands of rows in live formulas at once; copy and paste values once a batch finishes translating.

Frequently Asked Questions

Team Xl in Excel

Team Xl in Excel

Spreadsheet Architect & Educator at Xl in Excel. Sharing advanced formulas, dynamic arrays, and clean data modeling techniques.

Learn More About Team Xl in Excel →

Leave a Reply

Your email address will not be published. Required fields are marked *

Zoom: 100% | UTF-8 | Xl in Excel