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 195<br />

The following array formula is a modified version that is not case sensitive:<br />

{=(SUM(LEN(Data))-SUM(LEN(SUBSTITUTE(UPPER(Data),<br />

UPPER(Text),””))))/LEN(Text)}<br />

Counting the number of unique values<br />

The following array formula returns the number of unique values in a range named Data:<br />

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

To understand how this formula works, you need a basic understanding of array formulas. (See<br />

Chapter 14 for an introduction to this topic.) In Figure 7-5, range A1:A12 is named Data. Range<br />

C1:C12 contains the following multicell array formula. A single formula was entered into all 12 cells<br />

in the range.<br />

{=COUNTIF(Data,Data)}<br />

Figure 7-5: Using an array formula to count the number of unique values in a range.<br />

You can access the workbook count unique.xlsx shown in Figure 7-5 on the companion<br />

CD-ROM.<br />

The array in range C1:C12 consists of the count of each value in Data. For example, the number<br />

100 appears three times, so each array element that corresponds to a value of 100 in the Data<br />

range has a value of 3.

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

Saved successfully!

Ooh no, something went wrong!