0

I'm new on this platform and just started working on Excel, and my company would like the contents in their Excel files to be translated. I've seen that you can install some functions but I have to pay for their use. I saw this post Translate text using vba but I don't really understand that much, someone could please explain it to me or maybe tell me how to do it ? I'm suppose to translate cells from English to French. And would it be possible to make it automatic ?

Thank you in advance.

  • If the contents are fixed - we had a helpfile and swapped the contents between 5 languages using a choose() function, 5 cells had the 5 languages. – Solar Mike May 27 '22 at 09:43
  • Thank you Solar Mike for your answer. I'm a bit lost with your answer sorry Excel is a app I've work with only once or twice so I'm really slow to comprehend. – Theo Yamada May 27 '22 at 10:27

1 Answers1

0

It's in fact not that complicated: the function, mentioned in the other post, is a User-Defined Function (also known as UDF, follow the link for more informatoin). You just create a module in your VBA environment and copy/paste that function.

In order to use it, you can simply put some information in one cell (let's say "A1"), and in another cell (let's say "A2") you put the Excel formula:

=translate_using_vba(A1)

Be aware that the function has been written to translate into Spanish. If you want to translate to French, you need to replace outputstring = "es" by outputstring = "fr" in the source code of the function.

Dominique
  • 16,450
  • 15
  • 56
  • 112
  • Hi Dominique, thank you for your time. I'm sorry, so I did as you said copy/past the function inside a module modified to outputstring = "fr" and put an information (I put "Hello world" as a test in a cell AI46) and next to it =translate_using_vba(AI46). But when i press enter its shows me #VALUE! I've checked everywhere I can't seem to find where the problem could come. – Theo Yamada May 27 '22 at 10:14