ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Number Format Question (https://www.excelbanter.com/excel-programming/402256-number-format-question.html)

Daniel

Number Format Question
 
I need to write a text file with numbers in the format 5E16.9.

I have the numbers already in an array (i,j) in VBA (they are not in a
workbook cell):

columntext = arr(i, j)

how do I request these numbers to be formatted 5E16.9?

thanks
Dan

joel

Number Format Question
 
Do you want a numeric result or a string result?

for a string
enumber = format(mynumber,"scientific")

To change the format of the wroksheet cell for scientific

Range("A1").NumberFormat = "0.00E+00"



"Daniel" wrote:

I need to write a text file with numbers in the format 5E16.9.

I have the numbers already in an array (i,j) in VBA (they are not in a
workbook cell):

columntext = arr(i, j)

how do I request these numbers to be formatted 5E16.9?

thanks
Dan


Daniel

Number Format Question
 
Joel,
it it a string,
it worked
thanks, happy holidays
Dan

"Joel" wrote:

Do you want a numeric result or a string result?

for a string
enumber = format(mynumber,"scientific")

To change the format of the wroksheet cell for scientific

Range("A1").NumberFormat = "0.00E+00"



"Daniel" wrote:

I need to write a text file with numbers in the format 5E16.9.

I have the numbers already in an array (i,j) in VBA (they are not in a
workbook cell):

columntext = arr(i, j)

how do I request these numbers to be formatted 5E16.9?

thanks
Dan



All times are GMT +1. The time now is 06:09 PM.

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