Adding comma to custom number

mcook

New Member
Joined
Aug 11, 2011
Messages
10
I am using Excel 2010 and having a problem figuring this out. I have a number like 123456, i needed to add a decimal to the last 2 digits. I used #"."#0 in the Custom types, now i need to add the comma so the number shows as 1,234.56. Can anyone help?
 
When i use that custom formula, any number that is not in the thousands does not have the decimal. All the numbers are bunched together.
Like this..
<TABLE style="WIDTH: 86pt; BORDER-COLLAPSE: collapse" border=0 cellSpacing=0 cellPadding=0 width=114><COLGROUP><COL style="WIDTH: 86pt; mso-width-source: userset; mso-width-alt: 4169" width=114><TBODY><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; WIDTH: 86pt; HEIGHT: 15pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" class=xl63 height=20 width=114 align=right>2,270.97</TD></TR><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; HEIGHT: 15pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" class=xl63 height=20 align=right>83463 </TD></TR><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; HEIGHT: 15pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" class=xl63 height=20 align=right>1,062.58</TD></TR><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; HEIGHT: 15pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" class=xl63 height=20 align=right>1,580.57</TD></TR><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; HEIGHT: 15pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" class=xl63 height=20 align=right>80790 </TD></TR></TBODY></TABLE>
Sorry, I forgot to check for that. Try this instead...

[>99999]#","###"."#0;#"."#0
 
Upvote 0

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
@mcook,

Just checking... you do realize you are only changing the appearance of your number, not its actual value, right? If you plan to use this number in calculations, while the cell shows 1,234.56, the value that will be used in your calculations is still 123456.

What would be the alternative? How do i go about changing the value of the field to be 1,234.56?
 
Upvote 0
Much closer.... now zero "0" value shows as ######################
It wasn't clear how small a number you wanted to be able to handle. Here is my Custom Format pattern, modified to better handle small values...

[>99999]#","##0"."00;0"."00
 
Upvote 0
What would be the alternative? How do i go about changing the value of the field to be 1,234.56?
You cannot format a change in value... you will have to find a way to divide that number by 100 in order to make it the right magnitude. How you go about this depends on how the number is getting into your worksheet in the first place and whether you need to preserve the original value or not. Assuming you do not want to use VB code, you could put this formula in B1 (assuming the value is in A1)...

=A1/100

then hide Column A (where the real value is stored) and format Column B cells normally. If you don't mind using VB code and/or you want to physically change the value in the cell itself, you will need to tell us where these values are located on your worksheet and how they are getting into your worksheet (manually type, copied from elsewhere, some other method?).
 
Upvote 0
I don't think we need to get all that complicated now..lol, but it's good to know.. Thanks for all your help with this..
 
Upvote 0

Forum statistics

Threads
1,224,604
Messages
6,179,857
Members
452,948
Latest member
UsmanAli786

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