View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
TKS_Mark TKS_Mark is offline
external usenet poster
 
Posts: 68
Default Japanese in Macros

The original formula was =INDIRECT("_"&AreaCde&"C[[#Totals],["&[ActCde]&"]]")
It builds the reference to another range based on the text in same column as
this cell but in the range called "AreaCde". It also uses information from
the same row but in a range called "ActCde". I need to translate [#Totals]
to [#集計].

"PA" wrote:

Well at this point, let's go back to basics. In your first post, you said
that the indirect formula return #REF. Can we fix that formula to make sure
it work in japan and avoid the find and replace?

What is your original formula and what is your currupt formula? How's the
sheet built?

PA

"TKS_Mark" wrote:

On the Japanese computer, the code for 集 is char(15672). But on the English
computer, char(15672) returns #VALUE!. And when I use the function
=code("集") on the English computer, it returns the answer 63. But when I
write =char(63) (or chr(63) in a macro) on the English computer, it returns
the question mark character "?".

Any ideas? It seems the chr results are different depending on the
computer's language.

"PA" wrote:

the chr() function is the same as the character function in Excel (not sure
of the name, I have french Excel). To get help on it, type chr in the VBA
editor and press F1.

Basicly, what it does is to return a character based on a number (0-255). So

Chr(74) & Chr(97) & Chr(112) & Chr(97) & Chr(110)

will return "Japan"

Explore a bit on it. Maybe you can return character from a different set of
letters (Japan).

Give me some news.

PA

"TKS_Mark" wrote:

What is the chr() function? Unfortunately, my programming experience it
limited to recording macros and trying to modify them slightly. If you give
me a hint, I can probably experiment and figure it out.

"PA" wrote:

Can you build your string in japan using the chr() function? Obviously, I
didn't try it on my computer;)

PA

"TKS_Mark" wrote:

I'm sharing an Excel 2007 file with coworkers in Japan. I use the indirect
function to build a formula based on several cells. The problem is, these
don't work on Japanese computers, so the formula results in #REF!

I was able to record a macro on a Japanese computer to translate from
English to Japanese:

Cells.Replace What:="[#Totals]", Replacement:="[#WŒv]", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False

The WŒv looks like [#集計] on the Japanese computer. When I run the above
program, nothing happens. There are no warnings, etc. When I paste from the
Japanese macro into the Excel file, it also looks like WŒv.

How can I get the Japanese to be properly recognized?