-1

Is it possible using excel vba to make a formula/function that can use the "new" translate function of excel so it could translate the text of a cell? something like

=translate(from_language;to_language;A1) and the result the translated text.

thanks for the help

  • Excel has a inbuilt translate function: Review -> Translate. – Wizhi Sep 01 '20 at 15:05
  • you cannot use the review->translate in vba. see this for work around: https://stackoverflow.com/questions/19098260/translate-text-using-vba – Scott Craner Sep 01 '20 at 15:24
  • I know, what i'm trying, is use that function in a formula, to automate the translation of the text is several cells! – Bruno Ranhel Sep 01 '20 at 15:26
  • How have you tried to convert the code to a UDF? Please [edit] your post with your attempt and explain where it goes wrong. – Scott Craner Sep 01 '20 at 15:33

1 Answers1

0

You can use any Excel feature into a VBA function, as in following very simple example (& means concatenation):

Function Do_Something(Target As Range)
  Do_Something = "Something: " & Target.Value
End Function

You can record a macro, in order to see how the translation is done in VBA, and turn this into a function.

Dominique
  • 16,450
  • 15
  • 56
  • 112