Search code examples
google-sheetsformula

How do I use two formulas in one cell on Google Sheets?


I'm trying to use the Googletranslate function on Google Sheets but would like the cell to detect English or Japanese. I wanted to use Detectlanguage to find out the language first but I'm not sure how to format it. Here's what I did but I get an error:

=if(=DETECTLANGUAGE(A2)="en",[=GOOGLETRANSLATE("jp"]))

If it's English, I wanted it to be translated to Japanese and vice versa. Does anyone know if I am on the right track? Thank you in advance.


Solution

  • based on the GOOGLETRANSLATE and DETECTLANGUAGE functions,

    try this:

    =IF(DETECTLANGUAGE(A2)="en",GOOGLETRANSLATE(A2, "en", "ja"),GOOGLETRANSLATE(A2, "ja", "en"))
    

    Source: https://support.google.com/docs/answer/3093331?hl=en https://support.google.com/docs/answer/3093278?hl=en