ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Numeric Format (https://www.excelbanter.com/excel-programming/402512-numeric-format.html)

Daniel

Numeric Format
 
I am writing a text file with numbers which I would like in E16.9 fortran
format, example:
-4.543785477E+01
1.675241709E+00

both positive and negative have 16 characters per number (the positive
includes the space instead of the - sign)

how can I do this with format (mynumber, ???)

is there any other way?
thanks
Dan

JLGWhiz

Numeric Format
 
FormatCellsScientific

"Daniel" wrote:

I am writing a text file with numbers which I would like in E16.9 fortran
format, example:
-4.543785477E+01
1.675241709E+00

both positive and negative have 16 characters per number (the positive
includes the space instead of the - sign)

how can I do this with format (mynumber, ???)

is there any other way?
thanks
Dan


JLGWhiz

Numeric Format
 
For VBA: MyRange.NumberFormat = "Scientific"

"Daniel" wrote:

I am writing a text file with numbers which I would like in E16.9 fortran
format, example:
-4.543785477E+01
1.675241709E+00

both positive and negative have 16 characters per number (the positive
includes the space instead of the - sign)

how can I do this with format (mynumber, ???)

is there any other way?
thanks
Dan


Daniel

Numeric Format
 
thanks guys but it returns numbers with an additional character due to the -
sign





"JLGWhiz" wrote:

For VBA: MyRange.NumberFormat = "Scientific"

"Daniel" wrote:

I am writing a text file with numbers which I would like in E16.9 fortran
format, example:
-4.543785477E+01
1.675241709E+00

both positive and negative have 16 characters per number (the positive
includes the space instead of the - sign)

how can I do this with format (mynumber, ???)

is there any other way?
thanks
Dan



All times are GMT +1. The time now is 06:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com