Solved

Custom format for a percentage column - Excel

Posted on 2012-03-14
8
215 Views
Last Modified: 2012-03-14
I have a column defined as percentage.  Is there a way to get '-' do display in the field if the value is 0.00%.
0
Comment
Question by:morinia
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
8 Comments
 
LVL 9

Assisted Solution

by:armchair_scouse
armchair_scouse earned 250 total points
ID: 37720991
Yes there is.  You need a custom format.  Custom formats allow you to specify how to display a value for positive, negative, zero and text values.  you separate the formats with a semi-colon.

Right-click on the cell to be formatted, select Format Cells, select Custom from the Caetgory list, then in the box below 'Type:', type in:

0%;0%;-

This will format positive and negative values as percentage, and zero values as dash.
0
 

Author Comment

by:morinia
ID: 37721127
Thanks,  

Can you tell me how to format a value less than .00005 as 0?
0
 
LVL 9

Accepted Solution

by:
armchair_scouse earned 250 total points
ID: 37721639
You can use Conditonal Formatting for this.  Highlight your range of cells to be formatted, then select Conditional Formatting (from the Home tab), then:
- select 'Format only cells that contain'
- edit the rule description so that it reads 'Cell Value less than 0.0005'
- click the Format button
- select Custom format, then type in 0 in the format box, then click OK
- click OK again to apply the Conditional Formatting

That hopefully will do the trick.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 92

Expert Comment

by:Patrick Matthews
ID: 37722372
You can actually do it without Conditional Formatting.  Just use a custom number format like this:

[<0.0005]0%;0%

If you wanted, say, 2.47%...

[<0.0005]0.00%;0.00%
0
 

Author Comment

by:morinia
ID: 37722441
The conditional formatting works perfectly.  Just one thing when accounting format is used the "-" is centered.  Is there a way with conditional formatting to get the "-" in the center?Currently it is right justified.

When there is a number I don't want it centered.  I was just wondering if I can get the "-" centered.
0
 
LVL 92

Expert Comment

by:Patrick Matthews
ID: 37722473
The "-" is NOT centered when you use the Accounting format.  Rather, the "-" is positioned to align with the decimal point, or to be flush to the right is there are no decimal places shown.
0
 

Author Comment

by:morinia
ID: 37722529
Am I correct that there is no way to center the "-"?
0
 
LVL 92

Expert Comment

by:Patrick Matthews
ID: 37722559
Not to my knowledge
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question