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

Data Analysis

  • Excel Line Chart
  • Working With Tables in Excel
  • How to calculate correlation coefficient Correlation in Excel
  • How to sum a total in multiple Excel tables
  • How to combine 2 or more chart types in a single chart in Excel

References

  • How to use Excel ROW Function
  • Extract all partial matches in Excel
  • VLOOKUP function: Description, Usage, Syntax, Examples and Explanation
  • How to use Excel LOOKUP Function
  • MATCH function: Description, Usage, Syntax, Examples and Explanation

Data Validations

  • Excel Data validation with conditional list
  • Excel Data validation whole percentage only
  • Excel Data validation no punctuation
  • Prevent invalid data entering in specific cells
  • Excel Data validation exists in list

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.

Worked Example:   How to check if cell contains some words but not others in Excel

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.

Worked Example:   Excel If, Nested If, And/Or Criteria Examples

Post navigation

Previous Post:

Excel Data validation unique values only

Next Post:

Excel Rank if formula Example

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

  • Return blank if in Excel
  • IF, AND, OR and NOT Functions Examples in Excel
  • OR function: Description, Usage, Syntax, Examples and Explanation
  • How to return blank in place of #DIV/0! error in Excel
  • How to use Excel TRUE Function

Date Time

  • MONTH function: Description, Usage, Syntax, Examples and Explanation
  • Calculate date overlap in days in Excel
  • Get last working day in month in Excel
  • Two ways to sum time over 30 minutes in Excel
  • How to get same date next month or previous month in Excel

Grouping

  • Calculate conditional mode with criteria in Excel
  • Group times into unequal buckets in Excel
  • If cell contains one of many things in Excel
  • How to randomly assign data to groups in Excel
  • How to randomly assign people to groups in Excel

General

  • Excel Ribbon Quick Overview For Beginners
  • How to create dynamic worksheet reference in Excel
  • Check if multiple cells have same value with case sensitive in Excel
  • Print Excel Sheet In Landscape Or Portrait
  • Excel Default Templates
© 2023 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning