18.11.2014 Views

Microsoft Office

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Part II<br />

Working with Formulas and Functions<br />

Using And criteria<br />

An And criterion counts cells if all specified conditions are met. A common example is a formula that<br />

counts the number of values that fall within a numerical range. For example, you may want to count cells<br />

that contain a value greater than 100 and less than or equal to 200. For this example, the new COUNTIFS<br />

function will do the job:<br />

=COUNTIFS(Amount,”>100”,Amount,”100”,Table1[Amount],”100”)-COUNTIF(Amount,”>200”)<br />

The formula counts the number of values that are great than 100 and then subtracts the number of values<br />

that are greater than or equal to 200. The result is the number of cells that contain a value greater than 100<br />

and less than or equal to 200. This formula can be confusing because the formula refers to a condition<br />

“>200” even though the goal is to count values that are less than or equal to 200. Yet another alternate<br />

technique is to use an array formula, like the one that follows. You may find it easier to create this type of<br />

formula:<br />

{=SUM((Amount>100)*(Amount1000”)<br />

An alternative formula, which works with all versions of Excel, uses the SUMPRODUCT function. The following<br />

formula returns the same result as the previous formula.<br />

=SUMPRODUCT((Month=”January”)*(SalesRep=”Brooks”)*(Amount>1000))<br />

256

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

Saved successfully!

Ooh no, something went wrong!