How do I format the number -123456789 as -12,34,56,789?

  • Thread starter Rick Rothstein \(MVP - VB\)
  • Start date
R

Rick Rothstein \(MVP - VB\)

Select Format Cells, click on Number in the Category list, set Decimal
Places to 0 and click on the first item in the Negative Numbers list (which
should be -1,234).

Rick
 
H

Héctor Miguel

hi, Scott !

try with the following custom number format:
[>9999999]##\,##\,##\,##0;[>99999]##\,##\,##0;#,##0

hth,
hector.
 
S

Scott

Hi Hector

Thank You.

The solution offered does not work for negative numbers. Can you please help?

Scott
 
J

Joco

Scott Hi,

In format cells>custom create the following
##","##","##","###
it should display + or - the way you require

Joco (London)

Scott said:
Hi Hector

Thank You.

The solution offered does not work for negative numbers. Can you please help?

Scott

Héctor Miguel said:
hi, Scott !

try with the following custom number format:
[>9999999]##\,##\,##\,##0;[>99999]##\,##\,##0;#,##0

hth,
hector.
 
H

Héctor Miguel

hi, Scott !
The solution offered does not work for negative numbers. Can you please help?

with Joco's proposal you will see *extra* commas if number is less than 9 digits

for negative numbers try with the following custom number format:
[<-9999999]-##\,##\,##\,##0;[<-99999]-##\,##\,##0;#,##0

[however] you won't be able to mix positive/negative number usin only one format :-(

you might want to give a try an extra cell/column and ws-functions [i.e.]
assuming the number in 'A1':

=text(a1,rept("##\,",match(len(abs(a1)),{3;4;6;8})-1)&"##0")

hth,
hector.
try with the following custom number format:
[>9999999]##\,##\,##\,##0;[>99999]##\,##\,##0;#,##0
 

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

Top