ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to find formula keywords for none English regional options (https://www.excelbanter.com/excel-programming/408627-how-find-formula-keywords-none-english-regional-options.html)

Ming Zhao[_2_]

How to find formula keywords for none English regional options
 
In my Visual Studio for Office application, I have the code that writes to an
Excel cell a formula

=IF(AND($A40<"",$B40<""),$A40-$B40,"")

It works well when the Windows Regional Option is English. But it does not
work when the Regional Option is changed to Swedish.

For Swedish settings, the separator needs to be changed from , to ; which
can be obtained from System.Globalization.CultureInfo.CurrentCulture. But it
also needs to change €œIF€ to €œWENN€ and €œAND€ to €œUND€. In another formula, I
have €œPOWER€.

Is there any system parameter that can return the text strings as the
replacement of €œIF€, €œAND€, €œPower€, etc. for the given regional option?
Otherwise to use a big Case statement to switch on the three letters Windows
language name is neither convenient nor complete.

Thanks in advance for any information.



Bob Phillips

How to find formula keywords for none English regional options
 
You would write the formula in the English form, Excel will translate it.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Ming Zhao" wrote in message
...
In my Visual Studio for Office application, I have the code that writes to
an
Excel cell a formula

=IF(AND($A40<"",$B40<""),$A40-$B40,"")

It works well when the Windows' Regional Option is English. But it does
not
work when the Regional Option is changed to Swedish.

For Swedish settings, the separator needs to be changed from , to ; which
can be obtained from System.Globalization.CultureInfo.CurrentCulture. But
it
also needs to change "IF" to "WENN" and "AND" to "UND". In another
formula, I
have "POWER".

Is there any system parameter that can return the text strings as the
replacement of "IF", "AND", "Power", etc. for the given regional option?
Otherwise to use a big Case statement to switch on the three letters
Windows
language name is neither convenient nor complete.

Thanks in advance for any information.






All times are GMT +1. The time now is 05:58 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com