Zero Supplement and Removal

  • Last update:November 08, 2024
  • Overview

    Problem

    Sometimes zero supplement or zero removal is required when you process numerical data, as shown in the following figure.

    2024-11-08_17-10-55.png

    Solution

    1. Select Number from the drop-down list of Format in Cell Element, and set the number of zeros in the input box below.

    2. Use formulas to supplement or remove zeros.

    3. Use arithmetic operations to supplement or remove zeros.

    Zero Supplement Method

    Zero Supplement Using Format Setting

    Select Number from the drop-down list of Format in Cell Element, and enter zeros in the input box below. The number of zeros entered determines the total length of the number after the zero supplement.

    2024-11-08_17-04-23.png

    Zero Supplement for Numbers Using Formulas

    Insert the formula FORMAT(A2,"#00000000") into B2, as shown in the following figure.

    2024-11-08_16-59-23.png

    Zero Supplement for Dates Using Formulas

    When using the MONTH() or DAY() functions, if the month or day is a single-digit value, it will be displayed without a leading zero. For example, January 9th will appear as "1" for the month and "9" for the day, instead of "01" and "09". If the zero-supplemented format shown in the following figure is required, you can use the CONCATENATE() function to prepend a zero to the retrieved month or day, and use the RIGHT() function to extract the rightmost two characters. The formulas are as follows:

    2024-11-08_17-28-59.png

    1. The formula for months: RIGHT(CONCATENATE('0',MONTH(TODAY())),2)

    2. The formula for days: RIGHT(CONCATENATE('0',DAY(TODAY())),2)

    Zero Removal Method

    Zero Removal Using Format Setting

    Select Number from the drop-down list of Format in Cell Element.

    2024-11-08_17-11-16.png

    Zero Removal Using Formulas

    1. The FORMAT() formula: FORMAT(Object from Which Zero is To Be Removed,"#0"), as shown in the following figure

    2. The SUM() formula: SUM(Object from Which Zero is To Be Removed), as shown in the following figure

    3. The AVERAGE() formula: AVERAGE(Object from Which Zero is To Be Removed), as shown in the following figure

    4. The MAX() formula: MAX(Object from Which Zero is To Be Removed), as shown in the following figure

    5. The MIN() formula: MIN(Object from Which Zero is To Be Removed), as shown in the following figure

    iconNote:
    You are advised not to use formulas 2 to 5 when the data involves grouping, as these formulas might alter the values.

    Zero Removal Using Arithmetic Operations

    1. Addition: Object from Which Zero is To Be Removed + 0 (for example, = A2 + 0)

    2. Subtraction: Object from Which Zero is To Be Removed - 0 (for example, = A2 - 0)

    3. Multiplication: Object from Which Zero is To Be Removed * 1 (for example, = A2 * 1)

    4. Division: Object from Which Zero is To Be Removed/1 (for example, = A2/1)


    Attachment List


    Theme: Report Application
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    9s后關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy