text formatting

mattmickle

Board Regular
Joined
Nov 17, 2010
Messages
81
Value = $7,564,264.00

I need this to become a sixteen character text string:

0000000756426400

my formula =Text(Text(substitute(B13,".",""),"0000000000000000"

becomes 000000007564264

this works if, for example, the number is $5,469,062.72, but for any round number, it drops the decimal zeroes.

the last 2 digits should be implied decimals. How can i keep them?
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
With
A1: $7,564,264.00

This regular formula returns the string you're looking for:
Code:
B1:[/COLOR]=TEXT(--SUBSTITUTE(TEXT(A1,"0.00"),".",""),"0000000000000000")
This also seems to work:
Code:
B1: =TEXT(A1*100,"0000000000000000")

In those examples, B1 evaluates to: "0000000756426400"

Is that something you can work with?
 
Last edited:
Upvote 0
Try this:
Code:
=SUBSTITUTE(TEXT(B13,"00000000000000.00"),".","")
 
Upvote 0
Joe4,
That worked! But, I figured out an easier way to accomplish it.

instead of substituting for the".", i just multiply the value times 100 in my Text formulas.
=Text(b13*100,"0000000000000000")

thanks for your help though!
 
Upvote 0
That worked! But, I figured out an easier way to accomplish it.

instead of substituting for the".", i just multiply the value times 100 in my Text formulas.
=Text(b13*100,"0000000000000000")
Yep, that works too.

That is one of the cool things about Excel. There is often multiple solutions to the same problem.
 
Upvote 0

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,632
Latest member
jladair

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top