Tradducciones de formulas

Marcelo Branco

MrExcel MVP
Joined
Aug 23, 2010
Messages
17,103
Office Version
  1. 2021
  2. 2010
Platform
  1. Windows
Amigos,

A menudo tenemos que traducir las fórmulas de nuestro idioma a Inglés y vice-versa.

A veces no es fácil y hacemos errores.

He creado estas dos funciones para facilitar.

Code:
Public Sub ENGtoYOURLANGUAGE()
    ActiveCell.Offset(1, 0) = ActiveCell.Formula
End Sub

Sólo tienes que copiar la fórmula del foro en Inglés y pegar en una celda. Con esta celda seleccionada, ejecutar el
procedimiento anterior y la fórmula aparecerá traducida en su idioma en la celda inmediatamente inferior.

Code:
Public Sub YOURLANGUAGEtoENG()
    Dim strFormula As String
 
    strFormula = ActiveCell.Formula
    ActiveCell.Offset(1, 0) = " " & strFormula
End Sub

Este procedimiento hace lo contrario. Pasa la fórmula de su idioma para o Inglés.

Espero que esto ayude.

M.
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Marcelo,

I don't speak Spanish, but have you looked at the FormulaLocal property?
 
Upvote 0
Sorry -- I just figured out it's not a question ... :(
 
Upvote 0
An improvement to the second procedure
Code:
Public Sub YOURLANGUAGEtoENG()
    Dim strFormula As String
 
    strFormula = ActiveCell.Formula
    ActiveCell.Offset(1, 0) = "'" & strFormula
End Sub

Now can switch English/YourLanguage/English...

shg4421

I had never heard about this property...What is it?

Tks for your comment

M.
 
Upvote 0
Since I've never used any version of Excel other than English, I can only speculate that Formula returns the English-centric VBA's English version, and FormulaLocal returns the formula in the language of the installed version.

'Tis I who should ask you, Marcelo!

Merry Christmas to you and your family.
 
Upvote 0
shg4421,

I've taken a look at
http://msdn.microsoft.com/en-us/library/aa205983(office.10).aspx

And have seen this

"Remarks
If the cell contains a constant, this property returns that constant. If the cell is empty, the property returns an empty string. If the cell contains a formula, the property returns the formula as a string, in the same format in which it would be displayed in the formula bar (including the equal sign

Example
Assume that you enter the formula =SUM(A1:A10) in cell A11 on worksheet one, using the American English version of Microsoft Excel. If you then open the workbook on a computer that's running the German version and run the following example, the example displays the formula =SUMME(A1:A10) in a message box.

MsgBox Worksheets(1).Range(A11).FormulaLocal"

The problem is that when you open a workbook originally produced in an english-version (or in any other language version) the formulas are immediately translated to the local version.
(my wife has a computer with the english-version installed so i'm used to use both versions - english and portuguese)

If i try, in my comuputer (portuguese-version), to enter mannualy a formula using the english words and separators i get an error and Excel doesnt allow me to enter the formula.

I have to enter it as a string, and doing so and using the LocalFormula property as written in the Microsoft support page i get the same string in english.

So, or i'm missing something, or the FormulaLocal property is not very useful.

Merry Christmas to you and your family too.

And a very happy 2011 to us!!!

M.
 
Upvote 0
shg4421,

Maybe it can be useful if the OS = portuguese-version and Excel = english version. (This is precisely the configuration of my wife computer)

I'll try it latter, if my wife allow me to use her computer :LOL:

M.
 
Upvote 0
An improvement to the second procedure
Code:
Public Sub YOURLANGUAGEtoENG()
    Dim strFormula As String
 
    strFormula = ActiveCell.Formula
    ActiveCell.Offset(1, 0) = "'" & strFormula
End Sub

Now can switch English/YourLanguage/English...

shg4421

I had never heard about this property...What is it?

Tks for your comment

M.

Interesante el aporte Marcelo.

Si me permites, realmento no veo la necesidad de la variable strFormula:

Code:
Public Sub YOURLANGUAGEtoENG()

    ActiveCell.Offset(1, 0) = "'" & ActiveCell.Formula

End Sub

o lo que es lo mismo:

Code:
Public Sub YOURLANGUAGEtoENG()

    with ActiveCell
        .Offset(1, 0) = "'" & .Formula
    end with

End Sub
 
Upvote 0
Interesante el aporte Marcelo.

Si me permites, realmento no veo la necesidad de la variable strFormula:

Code:
Public Sub YOURLANGUAGEtoENG()
 
    ActiveCell.Offset(1, 0) = "'" & ActiveCell.Formula
 
End Sub

o lo que es lo mismo:

Code:
Public Sub YOURLANGUAGEtoENG()
 
    with ActiveCell
        .Offset(1, 0) = "'" & .Formula
    end with
 
End Sub

mjrofra,

Gracias por el comentario y la mejora de mi procedimiento

Feliz Navidad!

M.
 
Upvote 0

Forum statistics

Threads
1,216,799
Messages
6,132,763
Members
449,759
Latest member
exnoob

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top