Pages

Sunday, February 12, 2012

Custom Format – Play with colors

There are four in-built number formats available in excel under “Number Category” in Format cell dialog box, they are explained in given table

S.No
Value
Format
Result
Color
1.
-1234.10
0.00
-1234.00
This Format string has only one section, hence it is applicable to all the entries. (I.e. Positive, negative and zero entries). It just adds two decimals with the value you entered and show the negative sign on the left side of the negative entries.
2.
-1234.10
0.00;[Red]0.00
1234.10
This format string has separate section for negative entries with [Red] color.
3.
-1234.10
0.00_);(0.00)
(1234.10)
This format adds parentheses. _ (Underscore) is used to line up the numbers. (i.e. positive numbers line up correctly with negative numbers that are enclosed in parentheses)
4.
-1234.10
0.00_);[Red](0.00)
(1234.10)
This format adds parentheses as well as [Red] color text format.
 
How to play with colors?

We can replace [Red] color string with any of the color code specified in the given table (Table B).
  1. For the first 8 colors, we can use the color names directly (they are not case-sensitive) 
  2. For remaining 48 colors, we have to use the color code.
Example:
[color 11]0.00;[red]0.00;[blue]0.00;[color 44]general

Table: B – Excel Color palette

FONT
INTERIOR
FONT
INTERIOR
FONT
INTERIOR
FONT
INTERIOR
[Color 1]
Black
[Color 15]
[Color 15]
[Color 29]
[Color 29]
[Color 43]
[Color 43]
[Color 2]
White
[Color 16]
[Color 16]
[Color 30]
[Color 30]
[Color 44]
[Color 44]
[Color 3]
Red
[Color 17]
[Color 17]
[Color 31]
[Color 31]
[Color 45]
[Color 45]
[Color 4]
Green
[Color 18]
[Color 18]
[Color 32]
[Color 32]
[Color 46]
[Color 46]
[Color 5]
Blue
[Color 19]
[Color 19]
[Color 33]
[Color 33]
[Color 47]
[Color 47]
[Color 6]
Yellow
[Color 20]
[Color 20]
[Color 34]
[Color 34]
[Color 48]
[Color 48]
[Color 7]
Magenta
[Color 21]
[Color 21]
[Color 35]
[Color 35]
[Color 49]
[Color 49]
[Color 8]
Cyan
[Color 22]
[Color 22]
[Color 36]
[Color 36]
[Color 50]
[Color 50]
[Color 9]
[Color 9]
[Color 23]
[Color 23]
[Color 37]
[Color 37]
[Color 51]
[Color 51]
[Color 10]
[Color 10]
[Color 24]
[Color 24]
[Color 38]
[Color 38]
[Color 52]
[Color 52]
[Color 11]
[Color 11]
[Color 25]
[Color 25]
[Color 39]
[Color 39]
[Color 53]
[Color 53]
[Color 12]
[Color 12]
[Color 26]
[Color 26]
[Color 40]
[Color 40]
[Color 54]
[Color 54]
[Color 13]
[Color 13]
[Color 27]
[Color 27]
[Color 41]
[Color 41]
[Color 55]
[Color 55]
[Color 14]
[Color 14]
[Color 28]
[Color 28]
[Color 42]
[Color 42]
[Color 56]
[Color 56]

1 comment: