Keep Trailing Zeros When Convert To Text

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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/[email protected]
 
=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:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top