Format Property – Quantity and Foreign money Knowledge Varieties

Format Property – Quantity and Foreign money Knowledge Varieties

You may set the Format property to predefined quantity codecs or customized quantity codecs for the Quantity and Foreign money information sorts.

Setting

Predefined Codecs

The next desk exhibits the predefined Format property settings for numbers.

Setting

Description

Basic Quantity

(Default) Show the quantity as entered.

Foreign money

Use the thousand separator; comply with the settings specified within the regional settings of Home windows for damaging quantities, decimal and forex symbols, and decimal locations.

Euro

Use the euro image ( euro ), whatever the forex image specified within the regional settings of Home windows.

Mounted

Show at the least one digit; comply with the settings specified within the regional settings of Home windows for damaging quantities, decimal and forex symbols, and decimal locations.

Commonplace

Use the thousand separator; comply with the settings specified within the regional settings of Home windows for damaging quantities, decimal symbols, and decimal locations.

P.c

Multiply the worth by 100 and append a p.c signal (%); comply with the settings specified within the regional settings of Home windows for damaging quantities, decimal symbols, and decimal locations.

Scientific

Use customary scientific notation.

Customized Codecs

Customized quantity codecs can have one to 4 sections with semicolons (;) because the checklist separator. Every part accommodates the format specification for a unique sort of quantity.

Part

Description

First

The format for constructive numbers.

Second

The format for damaging numbers.

Third

The format for zero values.

Fourth

The format for Null values.

For instance, you possibly can use the next customized Foreign money format:

$#,##0.00[Green];($#,##0.00)[Red];”Zero”;”Null”

This quantity format accommodates 4 sections separated by semicolons and makes use of a unique format for every part.

If you happen to use a number of sections however do not specify a format for every part, entries for which there isn’t any format will both show nothing or default to the formatting of the primary part.

You may create customized quantity codecs through the use of the next symbols.

Image

Description

. (interval)

Decimal separator. Separators are set within the regional settings in Home windows.

, (comma)

Thousand separator.

0

Digit placeholder. Show a digit or 0.

#

Digit placeholder. Show a digit or nothing.

$

Show the literal character “$”.

%

Share. The worth is multiplied by 100 and a p.c signal is appended.

E– or e–

Scientific notation with a minus signal (–) subsequent to damaging exponents and nothing subsequent to constructive exponents. This image should be used with different symbols, as in 0.00E–00 or 0.00E00.

E+ or e+

Scientific notation with a minus signal (–) subsequent to damaging exponents and a plus signal (+) subsequent to constructive exponents. This image should be used with different symbols, as in 0.00E+00.

Remarks

You should utilize the DecimalPlaces property to override the default variety of decimal locations for the predefined format specified for the Format property.

The predefined forex and euro codecs comply with the settings within the regional settings of Home windows. You may override these by coming into your personal forex format.

Instance

The next are examples of the predefined quantity codecs.

Setting

Knowledge

Show

Basic Quantity

3456.789
–3456.789
$213.21

3456.789
–3456.789
$213.21

Foreign money

3456.789
–3456.789

$3,456.79
($3,456.79)

Mounted

3456.789
–3456.789
3.56645

3456.79
–3456.79
3.57

Commonplace

3456.789

3,456.79

P.c

3
0.45

300%
45%

Scientific

3456.789
–3456.789

3.46E+03
–3.46E+03

The next are examples of customized quantity codecs.

Setting

Description

0;(0);;”Null”

Show constructive values usually; show damaging values in parentheses; show the phrase “Null” if the worth is Null.

+0.0;–0.0;0.0

Show a plus (+) or minus (–) signal with constructive or damaging numbers; show 0.Zero if the worth is zero.

Leave a Reply