Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

XL: Minus Sign Appears Before Text in Custom Number Format


View products that this article applies to.

This article was previously published under Q214304

↑ Back to the top


Symptoms

In Microsoft Excel, when you create a custom number format that contains a text string, and you apply this format to a negative number, the text string may appear between the minus sign (-) and the number.

↑ Back to the top


Workaround

To create a custom number format so that the minus sign for negative number appears directly before the number, you must include formatting specifically for negative numbers. For example, instead of using the following code
   "The value is "0.
				
which uses the same format for both positive and negative numbers, use the following code:
   "The value is "0.;"The value is "-0.
				
The section of the format after the semicolon (;) places the minus sign to the right of the text string when the number is negative.

↑ Back to the top


Keywords: KB214304, kbprb

↑ Back to the top

Article Info
Article ID : 214304
Revision : 4
Created on : 1/24/2007
Published on : 1/24/2007
Exists online : False
Views : 454