Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Todd G
 
Posts: n/a
Default Keep Trailing Zeros When Convert To Text

Is there a way any one knows about to keep the 00 portion with the dollar
amount when you convert to a text format.
e.g. $234.00 converted to text to be 23400, not like it automatically does
234.

The other amounts where there are actual cents work fine as we all know, but
I need everything, no matter if there are pennies or not.
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Keep Trailing Zeros When Convert To Text

It sounds like you're not just saving as a text file (.txt or .prn).

I like to use helper columns and put formulas in that make it what I want:

=text(a1*100,"000000")

for instance.

Not knowing what you're doing....

Are you trying to create a fixed width text file?

If you are, you could concatenate the cell values into another column:

=LEFT(A1&REPT(" ",5),5) & LEFT(B1&REPT(" ",4),4) & TEXT(C1*100,"00000000")

(You'll have to modify it to match what you want.)

Drag it down the column to get all that fixed width stuff.

Then I'd copy and paste to notepad and save from there. Once I figured out that
ugly formula, I kept it and just unhide that column when I wanted to export the
data.

If that doesn't work for you, maybe you could do it with a macro.

Here's a link that provides a macro:
http://google.com/groups?threadm=015...0a% 40phx.gbl

Todd G wrote:

Is there a way any one knows about to keep the 00 portion with the dollar
amount when you convert to a text format.
e.g. $234.00 converted to text to be 23400, not like it automatically does
234.

The other amounts where there are actual cents work fine as we all know, but
I need everything, no matter if there are pennies or not.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
Stefi
 
Posts: n/a
Default Keep Trailing Zeros When Convert To Text

=TEXT(A1,"0.00") gives 234.00!
If you really don't need decimal point, then
=SUBSTITUTE(TEXT(A1,"0.00"),".","")

Regards,
Stefi


Todd G ezt *rta:

Is there a way any one knows about to keep the 00 portion with the dollar
amount when you convert to a text format.
e.g. $234.00 converted to text to be 23400, not like it automatically does
234.

The other amounts where there are actual cents work fine as we all know, but
I need everything, no matter if there are pennies or not.

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
Numeric in Text to convert back to the form of Numeric for VLookup Purposes achilles Excel Discussion (Misc queries) 4 February 6th 06 07:05 AM
Convert postcode to text David Ehmer Excel Discussion (Misc queries) 1 January 23rd 06 11:58 AM
Formulas dealing with text data Bagia Excel Worksheet Functions 6 June 20th 05 10:29 PM
convert a range of lowercase text to upper text or vice versa jackdaw Excel Worksheet Functions 2 May 16th 05 09:31 PM
Convert data of cells to any type: Number, Date&Time, Text Kevin Excel Discussion (Misc queries) 0 December 30th 04 06:55 AM


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

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"