Custom Number Format

goss

Active Member
Joined
Feb 2, 2004
Messages
372
Hi all,

Using Excel 2010.

I would like a customer number format with a leading "+" for positive number and a leading "-" for negative numbers.

My string works for positive numbers + 200.00 but not negative numbers.
The negatives display as (200.00). I would prefer - 200.00.
Current display string:
"+"_(* #,##0.00_);_(* (#,##0.00);"-"_(* "-"??_);_(@_)

I tried copying the format for positive numbers into the display for negative values and changed the sign, but that still displayed as (200.00)

I tried some variations on the format string such as
"+"_(* #,##0.00_);_(* (#,##0.00);"-"_*#,##0.00_;_(@_)

But I received back an error message:
Microsoft Excel cannot use the number format you typed

Any thoughts on how I can get the display I would like?
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Custom Number formats are in the order:
Positive;Negative;Zero;Text

You have the negative sign associated with the Zero field.

Try:
Code:
"+"_(* #,##0.00_);"-"_(* (#,##0.00);_(* "-"??_);_(@_)
 
Upvote 0
Thanks Expiry and MrKowz,

Expiry,

I started with the accounting format with no leading $ sign, its just my preference.
I added the "+" in front. The end result aligns the plus to the left of the cell and the number to the right of the cell. This gives nice visual clarity to the end user as to itent for cr/db while using using one column rather than two.

MrKowz,

Thanks for pointing that out.
Here is my final format string, works great!
"+"_(* #,##0.00_);"-"_(* #,##0.00_);_(* "-"??_);_(@_)
 
Upvote 0
Glad it works. Thanks for the feedback! ;)
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,297
Members
452,903
Latest member
Knuddeluff

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