Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default 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.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF returns #VALUE! when regional language setting not English!? Andrew Wiles Excel Programming 2 January 28th 08 09:28 PM
Regional Options Bill[_30_] Excel Programming 1 September 11th 06 08:43 PM
Dates using Regional Options AussieDave[_2_] Excel Programming 2 September 5th 06 03:17 PM
Using VBA to temporarily bypass regional options Carim[_3_] Excel Programming 5 March 9th 06 02:34 PM
Regional Options and Decimal symbol from VBA Henrik Wikström Excel Programming 1 August 2nd 03 04:01 AM


All times are GMT +1. The time now is 07:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"