Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 354
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 354
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Number Format question darby Excel Discussion (Misc queries) 5 August 26th 09 02:15 PM
Excel Number Format Question snolte Excel Discussion (Misc queries) 1 May 13th 09 11:56 PM
format number-date question driller Excel Discussion (Misc queries) 16 April 14th 09 06:38 AM
Number format question BobK Excel Discussion (Misc queries) 2 October 24th 08 08:12 PM
Custom Number format question Joh Excel Discussion (Misc queries) 5 October 25th 05 02:31 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"