Custom Format with leading zeros?

sammipd

Board Regular
Joined
Jun 6, 2010
Messages
69
I have a column of prices which need to be displayed in a four digit format without symbols. It also needs to keep the 4 digit format when used in a concatenate formula. $3.99, $5.00, $.47 should display as 0399, 0500, and 0047 and in the center of the formula as 1501x0399x1523. I either lose the leading zeros, or it automatically rounds up. How can I make this work? Thanks for your help!
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
I have a column of prices which need to be displayed in a four digit format without symbols. It also needs to keep the 4 digit format when used in a concatenate formula. $3.99, $5.00, $.47 should display as 0399, 0500, and 0047 and in the center of the formula as 1501x0399x1523. I either lose the leading zeros, or it automatically rounds up. How can I make this work? Thanks for your help!

I don't think you will be able to format the values that way within the cells the numbers are in, but you can get them to appear the way you want inside of other formulas. For example, let's say you have these values in the indicated cells...

A1: $15.01
A2: $3.99
A3: $15.23

to get the display you show you want, you would need to use this formula...

=TEXT(100000*A1,"0000,")&"x"&TEXT(100000*A2,"0000,")&"x"&TEXT(100000*A3,"0000,")
 
Upvote 0

Forum statistics

Threads
1,223,234
Messages
6,170,891
Members
452,366
Latest member
TePunaBloke

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