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

Lookup and Reference Examples

  • Basic INDEX MATCH approximate in Excel
  • How to get last column number in range in Excel
  • How to use Excel ROW Function
  • Convert text string to valid reference in Excel using Indirect function
  • LOOKUP function: Description, Usage, Syntax, Examples and Explanation

Data Analysis Examples

  • Move chart to a separate worksheet in Excel
  • Excel Pie Chart
  • How to combine 2 or more chart types in a single chart in Excel
  • Add Outline to Data in Excel
  • Excel Frequency Function Example

Data Validation Examples

  • Excel Data validation with conditional list
  • Excel Data validation number multiple 100
  • Excel Data validation don’t exceed total
  • Excel Data validation exists in list
  • Excel Data validation whole percentage only

How to return TRUE when all cells in range are blank in Excel

by

To return TRUE when all cells in a range are blank or empty, you can use a formula based on SUMPRODUCT and a logical test that suits the use case.

Formula

=SUMPRODUCT(--(range<>""))=0

Explanation

In the example shown, the formula in E5 is:

=SUMPRODUCT(--(B5:D5<>""))=0

How this formula works

Working from the inside out, this formula contains an expression inside SUMPRODUCT that tests each cell in a range like so:

--(B5:D5<>"")

Inside the parentheses, the result of B5:D5<>”” looks like this:

Worked Example:   Fibonacci Sequence in Excel

{TRUE,FALSE,TRUE}

The double hyphen then converts the TRUE FALSE values to one’s and zeros:

Worked Example:   Weighted average in Excel

{1,0,1}

Note that the 1’s in this array correspond to cells that are not blank or empty. Then, with only one array to work with, SUMPRODUCT simply multiples these values together and returns the result.

Any time the result is greater than zero, we know that not every cell in the range is blank. To force the formula to return TRUE if every cell is blank, and FALSE if not, we simply add =0 to the end of the formula.

Worked Example:   Sum if equal to one of many things in Excel

Post navigation

Previous Post:

How to get first column number in range in Excel

Next Post:

How to get first row number 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
  • Complete List of Excel Text Functions References and Examples
  • ASC function: Description, Usage, Syntax, Examples and Explanation
  • Remove first character in a cell in Excel
  • How to extract name from email address in Excel
  • How to check if cell contains all of many things in Excel
  • Get week number from date in Excel
  • Calculate date overlap in days in Excel
  • Extract date from a date and time in Excel
  • Get last weekday in month in Excel
  • Get date from day number in Excel
  • TBILLEQ function: Description, Usage, Syntax, Examples and Explanation
  • PPMT function: Description, Usage, Syntax, Examples and Explanation
  • ACCRINT function: Description, Usage, Syntax, Examples and Explanation
  • PDURATION function: Description, Usage, Syntax, Examples and Explanation
  • ACCRINTM function: Description, Usage, Syntax, Examples and Explanation
Acronyms, Abbreviations, Initialism & What They Stand For
© 2021 xlsoffice. All Rights Reserved | Teal Smiles