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.

208<br />

Part II: Using Functions in Your <strong>Formula</strong>s<br />

Summing values based on a text comparison<br />

The following formula returns the total invoice amounts for the Oregon office:<br />

=SUMIF(Office,”=Oregon”,Amount)<br />

Using the equal sign is optional. The following formula has the same result:<br />

=SUMIF(Office,”Oregon”,Amount)<br />

To sum the invoice amounts for all offices except Oregon, use this formula:<br />

=SUMIF(Office,”Oregon”,Amount)<br />

Text comparisons are not case-sensitive.<br />

Summing values based on a date comparison<br />

The following formula returns the total invoice amounts that have a due date after May 1, 2010:<br />

=SUMIF(DateDue,”>=”&DATE(2010,5,1),Amount)<br />

Notice that the second argument for the SUMIF function is an expression. The expression uses<br />

the DATE function, which returns a date. Also, the comparison operator, enclosed in quotation<br />

marks, is concatenated (using the & operator) with the result of the DATE function.<br />

The formula that follows returns the total invoice amounts that have a future due date (including<br />

today):<br />

=SUMIF(DateDue,”>=”&TODAY(),Amount)<br />

Conditional Sums Using Multiple Criteria<br />

The examples in the preceding section all use a single comparison criterion. The examples in this<br />

section involve summing cells based on multiple criteria.<br />

Figure 7-16 shows the sample worksheet again, for your reference. The worksheet also shows the<br />

result of several formulas that demonstrate summing by using multiple criteria.

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

Saved successfully!

Ooh no, something went wrong!