TEXT Worksheet Function

The =TEXT() worksheet function converts a number to a string, according to a specified format. The format string has to use formatting characters defined by the Windows Regional Settings (or Excel's International Options override). Hence, if you use =TEXT(NOW(),"dd/mm/yyyy"), you will get 01/02/yyyy on Norwegian Windows, because Excel will only recognize รค as the Norwegian number-format character used for years. Excel does not translate the number-format characters when it opens the file on a different platform. The easiest way to work around this is to include a range of formatted cells within your workbook, and some VBA code that writes their number format to the cell when the workbook is opened. Any =TEXT() functions in the sheet can then refer to those cells for their formatting codes.

0 0

Post a comment