11.08.2013 Views

Excel's Formula - sisman

Excel's Formula - sisman

Excel's Formula - sisman

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 7: Counting and Summing Techniques 187<br />

Counting logical values<br />

The following array formula returns the number of logical values (TRUE or FALSE) in a range<br />

named Data:<br />

{=SUM(IF(ISLOGICAL(Data),1))}<br />

Counting error values in a range<br />

Excel has three functions that help you determine whether a cell contains an error value:<br />

ISERROR: Returns TRUE if the cell contains any error value (#N/A, #VALUE!, #REF!,<br />

#DIV/0!, #NUM!, #NAME?, or #NULL!)<br />

ISERR: Returns TRUE if the cell contains any error value except #N/A<br />

ISNA: Returns TRUE if the cell contains the #N/A error value<br />

Notice that the #N/A error value is treated separately. In most cases, #N/A is not a<br />

“real” error. #N/A is often used as a placeholder for missing data. You can enter the<br />

#N/A error value directly or use the NA function:<br />

=NA()<br />

You can use these functions in an array formula to count the number of error values in a range.<br />

The following array formula, for example, returns the total number of error values in a range<br />

named Data:<br />

{=SUM(IF(ISERROR(Data),1))}<br />

Depending on your needs, you can use the ISERR or ISNA function in place of ISERROR.<br />

If you would like to count specific types of errors, you can use the COUNTIF function. The following<br />

formula, for example, returns the number of #DIV/0! error values in the range named Data:<br />

=COUNTIF(Data,”#DIV/0!”)<br />

Advanced Counting <strong>Formula</strong>s<br />

Most of the basic examples I presented previously use functions or formulas that perform conditional<br />

counting. The advanced counting formulas that I present here represent more complex<br />

examples for counting worksheet cells, based on various types of selection criteria.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!