Excel 2010 Bible

(National Geographic (Little) Kids) #1

Part II: Working with Formulas and Functions


284


FIGURE 13.1

Formulas in column E display various counts of the data in A1:B10.


Counting blank cells ...............................................................................................

The following formula returns the number of blank (empty) cells in a range named Data:

=COUNTBLANK(Data)

The COUNTBLANK function also counts cells containing a formula that returns an empty string.
For example, the formula that follows returns an empty string if the value in cell A1 is greater
than 5. If the cell meets this condition, the COUNTBLANK function counts that cell.

=IF(A1>5,””,A1)

Most of the examples in this chapter use named ranges for function arguments. When you adapt these
formulas for your own use, you’ll need to substitute either the actual range address or a range name
defined in your workbook.

Also, some examples consist of array formulas. An array formula is a special type of formula that
enables you to perform calculations that would not otherwise be possible. You can spot an array for-
mula because it’s enclosed in curly brackets when it’s displayed in the Formula bar. In addition, I use
this syntax for the array formula examples presented in this book. For example:
{=Data*2}

When you enter an array formula, press Ctrl+Shift+Enter (not just Enter) but don’t type the curly brack-
ets (Excel inserts the brackets for you.) If you need to edit an array formula, don’t forget to use
Ctrl+Shift+Enter when you finish editing (otherwise, the array formula will revert to a normal formula,
and it will return an incorrect result). See Chapter 16 for an introduction to array formulas.

About This Chapter’s Examples

Free download pdf