How to Format Decimal-Aligned Percentages Without Extra Zeros in Excel
Question details
The user needs to create an Excel percentage format that correctly aligns decimal points and rounds up to three decimal places while suppressing unnecessary trailing zeros and completely removing the decimal point for whole numbers.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Formatting financial or statistical percentage data in a clean, visually aligned column where numbers vary in decimal precision.
- Observed behavior
- Standard percentage formats force either misaligned text, unnecessary trailing zeros, or visible decimal points even when there are no decimals to display.
Ensure your target cells are stored as valid numeric percentages, and make a note of the starting cell reference (e.g., G1) for your conditional formatting formula.
Use Conditional Formatting with Custom Number Formats
Apply a conditional formatting rule to detect whole numbers and apply a specific custom format that perfectly aligns with the decimal placeholders of non-whole numbers.
Excel's standard custom formats cannot simultaneously align numbers by the decimal point and completely hide the decimal point for whole numbers. To achieve this, you must apply conditional formatting to test if the percentage has decimal content, and then apply a custom format utilizing underscore spacing.
Highlight the cells containing your percentage values. For example, select the range G1:G100.
Navigate to the 'Home' tab on the ribbon, click on 'Conditional Formatting', and select 'New Rule' from the dropdown menu.
Choose 'Use a formula to determine which cells to format'. In the formula box, enter =$G1*100=INT($G1*100). Note: Adjust '$G1' to match the topmost cell in your selection.
Click the 'Format' button, go to the 'Number' tab, and select 'Custom'. Enter the custom format code: \_(\* 0\_.\_0\_0\_0\_)%;[Red]\_(\* (0\_.\_0\_0\_0)%;\_(\* "─"\_);\_(@\_) to preserve character alignment while omitting the explicit decimal point.
Click 'OK' to save the rule. For the remaining non-whole numbers, ensure your base custom format is set to allow up to three decimals (e.g., 0.000%) so that the alignment created by the conditional formatting underscores perfectly matches.

Format Percentages and Decimals Effortlessly in WPS Office
WPS Spreadsheet fully supports advanced custom number formatting and conditional formatting rules, allowing you to beautifully align percentage decimals and clean up your data presentation just like Microsoft Excel.
- 1. Open your file in WPS: Launch WPS Spreadsheet and open the workbook containing your percentage data.
- 2. Set Conditional Formatting: Navigate to the Home tab, click 'Conditional Formatting', and choose 'New Rule' to input your INT formula.
- 3. Apply Custom Formats: Click 'Format' within the rule window, choose 'Custom' under the Number tab, and input your underscore-based alignment formatting code.

Frequently Asked Questions
What does the formula =$G1*100=INT($G1*100) do?
This formula checks if a percentage is a whole number. Because percentages are stored as fractions (e.g., 50% is 0.50), multiplying it by 100 converts it to 50. The INT function returns the integer portion of a number. If the multiplied value equals its integer portion, it means there are no extra decimals.
Why use underscores in the custom format code?
In spreadsheet custom formatting, an underscore '_' followed by a specific character inserts a space equal to the width of that character. Using \_.\_0\_0\_0 forces the cell to reserve horizontal space equivalent to a decimal point and three zeros, keeping your right-aligned numbers perfectly aligned.
Can I just use the question mark (?) placeholder instead of conditional formatting?
While the 0.???% custom format natively aligns decimals, it will still display a hanging decimal point for whole numbers (e.g., '50.%'). Using conditional formatting is required to completely hide the decimal point while maintaining the necessary spatial alignment.




