Skip to content
xlsoffice. All Rights Reserved
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Lookup and Reference Examples

  • How to get relative column numbers in a range in Excel
  • How to get first column number in range in Excel
  • How to get last row in mixed data with blanks in Excel
  • How to get first row number in range in Excel
  • Excel Advanced Lookup using Index and Match Functions

Data Analysis Examples

  • How To Compare Two Lists in Excel
  • How to create Checklist in Excel
  • Example of COUNTIFS with variable table column in Excel
  • Randomize/ Shuffle List in Excel
  • Excel Frequency Function Example

Data Validation Examples

  • Excel Data validation exists in list
  • Excel Data validation date in next 30 days
  • Excel Data validation must begin with
  • Excel Data validation whole percentage only
  • Excel Data validation number multiple 100

How to test a range for numbers in Excel

by

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

Formula

=SUMPRODUCT(--ISNUMBER(range))>0

Explanation

In the example shown, the formula in xxxx is:

=SUMPRODUCT(--ISNUMBER(C5:C9))>0

How this formula works

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

Worked Example:   How to get address of named range 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:

{FALSE;FALSE;FALSE;TRUE;FALSE}

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.

Worked Example:   Highlight cells that contain in Excel

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

Worked Example:   Sum columns based on adjacent criteria in Excel

{0;0;0;1;0}

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.

Post navigation

Previous Post:

Check if multiple cells have same value with case sensitive in Excel

Next Post:

How to count total columns in range in Excel

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
  • How to find and replace multiple values at same time in Excel
  • How to count specific characters in a range in Excel
  • How to abbreviate names or words in Excel
  • FIXED function: Description, Usage, Syntax, Examples and Explanation
  • Put names into proper case — Manipulating NAMES in Excel
  • Calculate date overlap in days in Excel
  • Get first day of previous month in Excel
  • Get date from day number in Excel
  • How to calculate next day of week in Excel
  • How to calculate Next working/business day in Excel
  • How to calculate principal for given period in Excel
  • Calculate payment for a loan in Excel
  • How to calculate Net Present Value (NPV) in Excel
  • CUMPRINC function: Description, Usage, Syntax, Examples and Explanation
  • PV function: Description, Usage, Syntax, Examples and Explanation
© 2022 xlsoffice . All Right Reserved. | Teal Smiles