Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default TEXT(Cell1,"MMMM YYYY") to work in all locale.

Hi TWIM
(read previous threads to follow what going on
OK writting in A2 MMMM YYYY is OK for English but when a user opens the file in Germany or another country they just see in A3 My Date Januar YYYY

If the user changes MMMM YYYY in A2 to MMMM JJJJ it shows the correct date, but this requirement defeats the object if each user needs to change the value in A2 for A3 to show the correct date. So it appears that the value in A2 is also hard coded and is not changed by the locale settings of a users computer, so my search for a solution still continues

Thanks anywa
regard
K

----- arno wrote: ----

Hi Kevin

you have a date in A1, in A2 you write your desired textformat eg. MM JJJ
(just type in the text). In A3 use the formul
=text(a1, a2) which will give you the correct result
but this does not work

yes, it does in a german version, (write in A2 MM YYYY to test in english)


in cell A1 I have 01.01.2004 (German date version
in cell A2 I have =A1 but with the cell format as MMMM YYYY showing Janua

200
do not do this, type MMMM YYYY and nothing else in the cell. i did not tel
to write =A1 and apply any forma


in cell A3 I have ="My Date: "&TEXT(A1;A2) showing My Date: 3798

try agai

arn



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 184
Default TEXT(Cell1,"MMMM YYYY") to work in all locale.

Hi Kevin,

have one formula to set the language for you. in one cell you write your
formula in
C1 =text(today(), "MM JJJJ").
in C2 use the following formula to find out if excel is in english or
german:

=IF(right(c1, 4)="JJJJ", "GERMAN", "english")

Now, your format cell (A2) has the formula:
=if(c2="GERMAN", "MM JJJJ", "MM YYYY")

(You could have this in one formula, but in 2 it is easier to understand. If
you have more than 2 languages use a table with all possibilities and
VLookup.)

dadldo the job :)

arno


"Kevin McCartney" schrieb im
Newsbeitrag ...
Hi TWIMC
(read previous threads to follow what going on)
OK writting in A2 MMMM YYYY is OK for English but when a user opens the

file in Germany or another country they just see in A3 My Date Januar YYYY.

If the user changes MMMM YYYY in A2 to MMMM JJJJ it shows the correct

date, but this requirement defeats the object if each user needs to change
the value in A2 for A3 to show the correct date. So it appears that the
value in A2 is also hard coded and is not changed by the locale settings of
a users computer, so my search for a solution still continues,

Thanks anyway
regards
KM

----- arno wrote: -----

Hi Kevin,

you have a date in A1, in A2 you write your desired textformat eg.

MM JJJJ
(just type in the text). In A3 use the formula
=text(a1, a2) which will give you the correct result.
but this does not work,

yes, it does in a german version, (write in A2 MM YYYY to test in

english).


in cell A1 I have 01.01.2004 (German date version)
in cell A2 I have =A1 but with the cell format as MMMM YYYY showing

Januar
2004
do not do this, type MMMM YYYY and nothing else in the cell. i did

not tell
to write =A1 and apply any format


in cell A3 I have ="My Date: "&TEXT(A1;A2) showing My Date: 37987

try again

arno





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
combine text & date formula to show mmmm dd, yyyy? htm_temp1 Excel Worksheet Functions 3 December 22nd 09 05:17 AM
Convert text "date" (DDMMMYY) to datetime value of YYYY-MM-DD - ho j.a. harriman Excel Discussion (Misc queries) 7 March 29th 07 01:20 AM
TEXT(Cell1,"MMMM YYYY") to work in all locale. Kevin McCartney[_2_] Excel Programming 2 February 12th 04 01:36 PM
TEXT(Cell1,"MMMM YYYY") to work in all locale. Dianne Excel Programming 0 February 10th 04 04:28 PM
TEXT(Cell1,"MMMM YYYY") to work in all locale. arno Excel Programming 0 February 10th 04 07:35 AM


All times are GMT +1. The time now is 02:03 PM.

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

About Us

"It's about Microsoft Excel"