Explanation

Data validation rules are triggered when a user adds or changes a cell value.

When a custom formula returns TRUE, validation passes and the input is accepted.

When a formula returns FALSE, validation fails and the input is rejected with a popup message.

Excel formula: Data validation allow numbers only

In this case, we have previously defined thenamed range"xlist" as D5:D11.

This range holds characters that are not allowed.

Next, the COUNT function returns the count of all numbers in the array.

Excel formula: Data validation allow text only

When the array contains no numbers (i.e.

no restricted characters) COUNT returns zero, the expression returns TRUE, and data validation succeeds.

However, When the array contains no numbers (i.e.

Excel formula: Count cells between two numbers

The characters that appear in the named rangexlistcan be customized fit requirements.

When the text is not found, FIND returns a #VALUE error.

COUNT Function

The Excel COUNT function returns a count of values that are numbers.

Excel formula: Data validation whole percentage only

Numbers include negative numbers, percentages, dates, times, fractions, and formulas that return numbers.

Empty cells and text values are ignored….

Excel FIND function

Excel COUNT function