Skip to content
Free Excel Tutorials
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Data Analysis

  • Example of COUNTIFS with variable table column in Excel
  • How To Remove Duplicates In Excel Column Or Row?
  • How to calculate average last N values in a table in Excel
  • How to conditionally sum numeric data in an Excel table using SUMIFS
  • How to count table columns in Excel

References

  • Extract all partial matches in Excel
  • How to get first column number in range in Excel
  • How to use Excel ROWS Function
  • How to get first row number in range in Excel
  • How to get last row in text data in Excel

Data Validations

  • Excel Data validation unique values only
  • Excel Data validation allow weekday only
  • Excel Data validation allow uppercase only
  • Excel Data validation whole percentage only
  • Prevent invalid data entering in specific cells

Excel Data validation whole percentage only

by

Set criteria to allow whole percentage only without decimals.

To allow only whole number percentages like 5%, 10% and not 5.5%, 10.25%, etc. you can use data validation with a custom formula based on the TRUNC function.

Formula

=TRUNC(A1*100)=(A1*100)
Notes: Data validation rules are triggered when a user adds or changes a cell value. Cell references in data validation formulas are relative to the upper left cell in the range selected when the validation rule is defined, in this case B5.

Explanation

In the example shown, the data validation applied to B5:B9 is:

=TRUNC(C5*100)=(C5*100)

How this formula works

The Excel TRUNC function does no rounding, it just returns a truncated number. It has an optional second argument (num_digits) to specify precision. When num_digits is not provided, it defaults to zero. In this formula for data validation to allow we use TRUNC get the non-decimal part of a percentage, after we multiply the percentage by 100.

For example, if a user inputs 15%:

=TRUNC(.15*100)=(.15*100)
=TRUNC(15)=(15)
=15=15
=TRUE

If a user enters 15.5%, the formula evaluates like this

=TRUNC(.155*100)=(.155*100)
=TRUNC(15.5)=(15.5)
=15=15.5
=FALSE

This formula doesn’t validate anything else, for example that percentages are less than 100%. Additional conditions can be added with the AND function.

Post navigation

Previous Post:

DECIMAL function: Description, Usage, Syntax, Examples and Explanation

Next Post:

AVERAGE function: Description, Usage, Syntax, Examples and Explanation

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others

Logical Functions

  • IFERROR function: Description, Usage, Syntax, Examples and Explanation
  • SWITCH function example in Excel
  • Check multiple cells are equal in Excel
  • IFNA function: Description, Usage, Syntax, Examples and Explanation
  • Not Equal To ‘<>‘ operator in Excel

Date Time

  • DAYS function: Description, Usage, Syntax, Examples and Explanation
  • How to calculate months between dates in Excel
  • How to get Holiday Date from Year in Excel
  • How to calculate future date say 6 months ahead in Excel
  • SECOND function: Description, Usage, Syntax, Examples and Explanation

Grouping

  • Map text to numbers in Excel
  • Group arbitrary text values in Excel
  • Map inputs to arbitrary values in Excel
  • How to randomly assign people to groups in Excel
  • If cell contains one of many things in Excel

General

  • Subtotal by color in Excel
  • List worksheet index numbers in Excel
  • How to generate random times at specific intervals in Excel
  • How to calculate percent sold in Excel
  • How to calculate profit margin percentage in Excel
© 2026 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning