Excel Office

Excel How Tos, Tutorials, Tips & Tricks, Shortcuts

How to test a range for numbers in Excel

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




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.

Also See:   Sum if equal to one of many things in Excel

When you supply a range of references to ISNUMBER (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.

Also See:   Sum lookup values using SUMIF in Excel

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.

Also See:   Delete Blank Rows at Once in Excel

Leave a Reply

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