Be able to control the display format of numeric data including number of decimal places, currency symbol, percentage

Published by Patrick Mutisya · 14 days ago

ICT 0417 – Databases: Controlling Numeric Display Formats

ICT 0417 – Databases

Topic 18: Databases – Controlling the Display Format of Numeric Data

In databases and spreadsheet applications you can change how numbers are shown without altering the underlying value. This is useful for readability, consistency and meeting the requirements of reports.

Key Concepts

  • Number of decimal places – controlling rounding and precision.
  • Currency symbols – adding $ , £ , € etc.
  • Percentage format – displaying a fraction as a percent.

Decimal Places

To set the number of decimal places you choose a format that specifies how many digits appear after the decimal point. The underlying value is unchanged; only the display is affected.

Example: The value 123.4567 displayed with two decimal places appears as 123.46.

In many tools the format code uses a period (.) followed by the required number of zeroes (0). Each zero forces a digit to be shown.

Format CodeResult for 123.4567
0123
0.0123.5
0.00123.46
0.000123.457

Currency Symbols

Adding a currency symbol places the appropriate sign before (or after) the number. The symbol is part of the format string.

Format CodeResult for 2500
\$#,##0\$2,500
£#,##0.00£2,500.00
€0.00€2500.00

The comma (,) is a thousands separator; the number of zeroes after the decimal point controls the cents/pence displayed.

Percentage Format

When a value represents a proportion (e.g., 0.375) you can display it as a percentage. The format multiplies the underlying value by 100 and adds the % sign.

Mathematically: \$\text{Displayed} = \text{Value} \times 100\%\$

Format CodeValueResult
0%0.37538%
0.0%0.37537.5%
0.00%0.37537.50%

Applying Formats in a Database/Spreadsheet

  1. Select the cell(s) or field(s) you wish to format.
  2. Open the Format Cells dialog (often via right‑click ► Format Cells).
  3. Choose the appropriate category – Number, Currency, or Percentage.
  4. Set the required number of decimal places.
  5. Confirm – the data will now appear in the chosen style.

Common Format Codes (Reference)

CodeMeaning
0Digit placeholder – displays a zero if no digit is present.
#Digit placeholder – does not display extra zeros.
.Decimal point.
,Thousands separator.
$, £, €Currency symbol.
%Percentage – multiplies by 100 and adds %.
"text"Literal text – appears exactly as typed.

Practice Exercises

  1. Enter the value 9876.543. Format it to show:

    • Two decimal places.
    • As US dollars with a thousands separator and two decimal places.
    • As a percentage with one decimal place.

  2. The field Price contains the number 49.9. Show how it would appear using the format code "£"#,##0.00.
  3. Explain what happens to the underlying data when you change a cell from 0.25 to a percentage format with zero decimal places.

Summary

  • Formatting changes only the visual representation, not the stored value.
  • Use the correct number of zeroes (0) to force displayed digits; use # to hide unnecessary zeros.
  • Currency symbols and thousand separators improve readability of monetary data.
  • Percentage formatting automatically scales the value by 100 and appends %.

Suggested diagram: Flowchart showing the steps to apply a numeric format in a spreadsheet.