Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   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,

The following funtion works on a computer that has "English" date format

setting each YYYY to represent a four digit year, but if view the same
workbook on a computer that has "German" settings I don't see a four digit
year I only see YYYY.

sorry, there's no simple solution. "YYYY" is "hardcoded" in your function
and it will not be translated.

what you can do:

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.

now, you should let the user select his language in a dropdown-menu (forms
toolbar). Based on this selection you set the value of A2 to MM JJJJ or MM
YYYY or whatever you like.

This is what you do for all your hardcoded formats, and in your formulas you
refer to the cells like A2.

Best regards

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
How to change "xxx CR" and "y,yyy DB" to "+xxx" and "-yyyy" vud i Excel Worksheet Functions 6 January 31st 09 05:37 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
Insert "-" in text "1234567890" to have a output like this"123-456-7890" Alwyn Excel Discussion (Misc queries) 3 October 25th 05 11:36 PM
Text(month(now()),"MMMM") deosnt work BOB Excel Worksheet Functions 4 February 7th 05 01:51 PM


All times are GMT +1. The time now is 11:50 AM.

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"