View Single Post
  #2   Report Post  
Jim Rech
 
Posts: n/a
Default

You should avoid like the plague any functions that use region-specific
strings like TEXT. Otherwise you'll have to find a way of determining
dynamically the format codes you need in the region of the user.

One way is with a macro. Just as an example, this macro returns the three
date codes of the current region:

Sub ListDateCode()
Range("A1").Value = Application.International(xlYearCode)
Range("A2").Value = Application.International(xlMonthCode)
Range("A3").Value = Application.International(xlDayCode)
End Sub

Then you could refer to these results like this:
=TEXT(F2,REPT(A2,2)&"."&REPT(A3,2)&"."&REPT(A1,4))

--
Jim Rech
Excel MVP
"n.almeida" wrote in message
...
|I appreciate any help. This is a problem I posted yesterday probably
without
| being very clear.
|
| How can I override the Windows Regional settings so that my Excel File
looks
| the same in a computer in Italy and in the Netherlands without forcing the
| user to change the Locale Regional settings?
| This affects the Date and the Time format, specially within formulas.
|
| Also it seems that the locale setting on Cell Format only works if the
| locale is NOT the default.
| i.e. A file with the default in UK Eng. and a cell date in Italian and
| another in UK Eng, will have the cell in Italian on a Dutch computer but
the
| UK one will be turned into Dutch.
|
| Besides, this setting does not work within a cell.
| i.e. the formula TEXT(E12,"*yymmdd")&"-Blabla" will look like
050216-Blabla
| on a UK Eng, but will look yy0216-Blabla on a Dutch or Italian computer
|
| I appreciate any help. This is a problem posted yesterda