Using FWRITELN() to Write a Formatted NumberLast reviewed: November 2, 1994Article ID: Q30008 |
The information in this article applies to:
SUMMARYWhen using the FWRITELN() function to output a formatted number from a worksheet to a file, the formatting does not remain. For example, a date is written to the file as a serial number instead of in the date format used on the worksheet. To write formatted numbers to a file, use the following formula:
=FWRITELN(file_number,TEXT(value,format_text))The format_text section of the formula is the format of the cell acquired from the Format Number command. For example, if the active cell on a worksheet contains 25-Mar-88, the macro formula used to write this to a file is the following:
=FWRITELN(file_number,TEXT(ACTIVE.CELL(),"d-mmm-yy"))For more information on the FWRITELN() and TEXT() functions, see the "Microsoft Excel Functions and Macros" manual.
|
KBCategory: kbusage
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |