Format function question
Hello, I am programming a series of Excel macros where the end result is to
write data from the cells into a text file. I am using the Print # command to
do this. One problem I have is that I need to put some of the numbers into
scientific notation in the text file, but the Format function does not seem to
work for me. For instance, suppose I had a worksheet cell where the value
is 0.002. I would write a macro line like this:
Print #1, Format(insert reference to cell here, "0.00E-00")
In the text file, this produces a value of 0.00E-00. If the cell value is 0.1, I
get 0.10E-00.
In other words, it seems like the Format function is putting the numbers in
the right format, but it keeps the exponent term equal to 0 and truncates
after 2 decimal places.
PLEASE HELP!!! In case it matters, I'm working on a Macintosh.
Thansk!
Barry
|