Range contains numbers

An excel formula to range contains numbers

Related Functions

Sponsored Link

 Range contains numbers

To test a range for numbers, you can use a formula based on the ISNUMBER and SUMPRODUCT functions.

In the example shown, the formula in xxxx is:


How this formula works

Working from the inside out, the ISNUMBER function will return TRUE when given a number and FALSE if not.

When you supply a range of references to ISNUMBE (i.e. an array), ISNUMBER will return an array of results. In the example, this array looks like this:


We want to know if this result contains any TRUE values, and the easiest way to check this is to force the TRUE FALSE values to ones and zeros, then add up the result.

The double negative operator (--) will force the TRUE and FALSE values to 1 and 0 respectively, yielding an array like this:


SUMPRODUCT then adds up the items in the array and returns the result.

Any result greater than zero means that at least one number exists in the range, so we we use ">0" to evaluate and return TRUE or FALSE.

Sponsored Link

0 votes. 0 / 5