Você está na página 1de 8

A.

SUMPRODUCT formula syntax and usage


The sum-product formula syntax is very simple. It takes 1 or more arrays of numbers and gets the sum of products of corresponding numbers. The syntax is =SUMPRODUCT (list 1, list 2 ...) So, for ex: if you have data like {2,3,4} in one list and {5,10,20} in another list, and if you apply SUMPRODUCT, you will get 120 (because 2*5 + 3*10 + 4*20 is 120). At this point it might seem like an almost useless function. But all that will change in the next 2 minutes, keep reading.

SUMPRODUCT and Arrays


Lets say you have a list of sales data with columns Name, Region, Product and Sales. Now, you want to know how many units the sales person named Luke sold. This is simple, you will write a SUMIF formula [examples] and use the Name column as criteria range and Sales column as sum range. But, wait a second, you want to find how many units sales person Luke sold in the region west. Hmm. we have 2 options,

Use an array formula Use a pivot table [what is a pivot table?]

Actually, there is a hidden third option, use SUMPRODUCT. That is right, my friend, we can use SUMPRODUCT to do just this (and much more).

Using SUMPRODUCT as an array formula


Assuming, the data is in range A1:D10, with Name in column A, Region in B, Product in C and Sales in D, the SUMPRODUCT formula is, =SUMPRODUCT(--(A1:A10="Luke Skywalker"),--(B1:B10="West"),D1:D10) Okay, lets take a minute and try to understand WTF (what the formula) is doing.

The portion --(A1:A10="Luke Skywalker")is looking for Luke Skywalker across planetary systems in all universes It is going to give us a bunch of ONEs and ZEROs, one if the cell

has Luke, Zero if the cell has something else.

The portion --(B1:B10="West")is doing the same, but gets 1s when the value is West. The portion D1:D10 is just returning all the sales figures. When you put everything together and multiply, it just works. Why? That is your home work to figure out.

How to use the INDEX and MATCH worksheet functions with multiple criteria in Excel
The following examples use the INDEX and MATCH worksheet functions to find a value based on multiple criteria. Back to the top

Example 1: Data in Columns


Method 1
1. 2. Start Excel. Type the following data into a new worksheet:

3. 4. 5. 6. 7.

A1: Part A2: x A3: x A4: y A5: y

B1: Code C1: Price D1: Find Part E1: Find Code B2: 11 C2: 5.00 D2: y E2: 12 B3: 12 C3: 6.00 D3: y E3: 11 B4: 11 C4: 7.00 D4: x E4: 12 B5: 12 C5: 8.00 D5: x E5: 11

8. To retrieve the price for part y with code 12 and return the value to cell F2, type the following formula in cell F2: =INDEX($C$2:$C$5,MATCH(D2,IF($B$2:$B$5=E2,$A$2:$A$5),0)) 9. Press CTRL+SHIFT+ENTER to enter the formula as an array formula.

The formula returns the value 8.00. 10. Select cell F2, grab the fill handle, and then fill down to cell F5 to retrieve the price for each part and code combination.

Method 2
A second method yields the same results but uses concatenation instead. The following sample formula may be better for matching data against more than two criteria because it does not require nested IF statements. This method is identical to Method 1 except that you replace the formula in step 3 with the following formula: =INDEX($C$2:$C$5,MATCH(D2&E2,$A$2:$A$5&$B$2:$B$5,0)) Back to the top

Example 2: Data Arranged in Rows

Method 1
1. 2. Start Excel. Type the following data into a new worksheet:

3. 4. 5. 6. 7.

A1: Part B1: x C1: x D1: y E1: y A2: Code B2: 11 C2: 12 D2: 11 E2: 12 A3: Price B3: 5.00 C3: 6.00 D3: 7.00 E3: 8.00 A4: Find Part B4: y C4: y D4: x E4: x A5: Find Code B5: 12 C5: 11 D5: 12 E5: 11

8. To retrieve the price for part y with code 12 and return the value to cell B6, type the following formula in cell B6: =INDEX($B$3:$E$3,MATCH(B4,IF($B$2:$E$2=B5,$B$1:$E$1),0)) 9. Press CTRL+SHIFT+ENTER to enter the formula as an array formula.

The formula returns the value 8.00. 10. Select cell B6, grab the fill handle, and then fill right to cell E6 to retrieve the price for each part and code combination.

Method 2
A second method yields the same results but uses concatenation instead. The following sample formula may be better for matching data against more than two criteria because it does not require nested IF statements. This method is identical to Method 1 (under Example 2) except that you replace the formula in step 3 with the following formula: =INDEX($B$3:$E$3,MATCH(B4&B5,$B$1:$E$1&$B$2:$E$2,0))

How to Use Excel's Vlookup Function


Excel VLOOKUP Function Tutorial

Excel's VLOOKUP function, which stands for vertical lookup, is used to find specific information that has been stored in a spreadsheettable. This tutorial includes step by step instructions of how to use Excel's VLOOKUP function. The syntax for the VLOOKUP function is: = VLOOKUP ( lookup_value , table_array , col_index_num , range_lookup ) lookup _value: The value you want to find in the first column of the table_array. table_array: This is the table of data that VLOOKUP searches to find the information you are after.

The table_array must contain at least two columns of data. The first column contains the lookup_values. col_index_num: The number of the column in the table_array that contains the data you want returned. range_lookup: A logical value (TRUE or FALSE only) that indicates whether you want VLOOKUP to find an exact or an approximate match to the lookup_value. Typing False will return exact matches only. Example: How to Use Excel's VLOOKUP Function Note: Before using VLOOKUP, make sure the table of data (the table_array) is sorted in ascending order (alphabetically A to Z). 1. Enter the data into cells D1 to E8 as seen in the image above. Remember to leave cells D2 and E2 blank. This is where the results of the VLOOKUP function will be displayed. 2. Click on cell E2 - the location where the results will be displayed.

3. Click on the Formulas tab. 4. Choose Lookup & Reference from the ribbon to open the function drop down list. 5. Click on VLOOKUP in the list to bring up the function'sdialog box. 6. In the dialog box, click on the Lookup _value line. 7. Click on cell D1 in the spreadsheet to enter that cell reference into the dialog box. This is
the cell where we will type the part name about which we are seeking information.

8. In the dialog box, click on the Table_array line. 9. Drag select cells D4 to E8 in the spreadsheet to enter that range into the dialog box. The
table_array is the table of data that VLOOKUP searches for the lookup_value specified in cell D1.

10.

In the dialog box, click on the Col_index_num line.

11. Type the number 2 to indicate that the data we want returned is in column 2 of the table_array.

12. 13.
data. 14.

In the dialog box, click on the Range_lookup line. Type the word False to indicate that we want an exact match for our requested

Click OK. In cell D1 of the spreadsheet, type the word bolt. The value $1.54 should appear in cell E1 displaying the price of a bolt as indicated

15. 16. 17.

in the table_array. If you click on cell E1, the complete function = VLOOKUP ( D1 , D4:E8 , 2 ,

FALSE )appears in the formula bar above the worksheet.

Excel COUNTIFS Function Quick Tutorial


Using COUNTIFS to Count Data in Selected Ranges
The COUNTIFS function, similar to Excel's COUNTIF function, counts up the number of times data in two or more ranges of cells meets multiple criterion. The syntax for the COUNTIFS function is: =COUNTIFS( Criteria_range-1, Criteria-1, Criteria_range-2, Criteria-2, ...) Criteria_range - the group of cells the function is to search. Criteria - determines whether the cell is to be counted or not. Note: Up to 127 range/criteria pairs can be entered into the function. The ranges must be of identical size, and the function only counts instances where the criterion for each range is met simultaneously - such as in the same row. Example: Using Excel's COUNTIFS Function In this example we will search cells D1 to D6 for values equal to 135 and cells F1 to F6 for values that are equal to 165. Excel will only count those instances when the values 165 and 135 occur in the same row within their respective ranges. For help with this example, see the image above. 1. Enter the following data into cells D1 to D6: 123, 135, 147, 135, 98, 135. 2. Enter the following data into cells E1 to E6: 165, 165, 178, 143, 130, 165. 3. Click on cell F1 - the location where the results will be displayed.

4. Click on the Formulas tab. 5. Choose More Functions > Statistical from the ribbon to open the function drop down
list.

6. Click on COUNTIFS in the list to bring up the function's dialog box. 7. In the dialog box, click on the button at the end of the Criteria_range1 line to return to
your spreadsheet.

8. Drag select cells D1 to D6 on the spreadsheet. 9. Click on the button at the end of the Criteria_range1 line to return to the dialog box. 10.
On the Criteria1 line in the dialog box, type the number "135".

11.

Click on the button at the end of the Criteria_range2 line to return to your

spreadsheet. 12. Drag select cells E1 to E6. Click on the button at the end of the Criteria_range2 line to return to the dialog

13.
box.

14.
15.

On the Criteria2 line in the dialog box, type the number "165". Click OK.

16. The answer 2 should appear in cell F1. Even though the numbers 135 and 165 appear three times in their respective ranges, there are only two instances (row 2 and row 6) when the numbers 135 and 165 appear in the same row within their respective ranges.

17.

When you click on cell F1 the complete function

= COUNTIFS ( D1 : D6 , 135 , E1 : E6 , 165 ) appears in the formula bar above theworksheet .

How to Link Data to Different Worksheets in Microsoft Excel


By Norm Dickinson, eHow Contributor | updated April 17, 2012

Microsoft Excel is available as a part of the Microsoft Office suite or it can be purchased separately.

Microsoft Excel allows data from a number of different worksheets and spreadsheets to be linked into a single sheet to summarize data from several sources. Formulas can be created that span different sources and calculations can be made using a combination of local and linked information. Link data to Excel from other spreadsheets and keep the information up to date without the need to edit multiple locations every time the data changes. Display data from multiple departments for an overview of details without sharing information between sources

Read more: How to Link Data to Different Worksheets in Microsoft Excel | eHow.com http://www.ehow.com/how_4503526_data-different-worksheets-microsoftexcel.html#ixzz1t1VcVhut

Instructions
1.

1 2

Launch Microsoft Excel and open each of the source spreadsheets that contain information to link into the target spreadsheet. Open the target spreadsheet last.
o

Click on the cell in the target spreadsheet that is to contain linked information from a source spreadsheet and press the "Equal" key ("="). Switch to the source spreadsheet and click on the cell that contains the information to be linked and then press "Enter." The target spreadsheet now contains a link to the data in the source spreadsheet as indicated in the formula bar. Changes made to the source spreadsheet will be reflected in the target spreadsheet automatically.
o o

Click on a cell in the target spreadsheet that is to contain calculated information from cells in multiple source spreadsheets and press the "Equal" key ("="). Switch to the first source spreadsheet and click on the first cell that contains the information to be linked. Type an operator such as the "Plus" key ("+") and click on the next cell in the formula, from the same source spreadsheet or a different one, or even from the target spreadsheet if desired. Continue to add operators and cell references until the formula is complete, then press "Enter" to store the formula and display the results of the calculation.

F. MS Excel: Mod Function


In Excel, the Mod function returns the remainder after a number is divided by a divisor. The syntax for the Mod function is: Mod( number, divisor ) number is a numeric value whose remainder you wish to find. divisor is the number used to divide the number parameter. If the divisor is 0, then the Mod function will return the #DIV/0! error.

Applies To:

Excel 2007, Excel 2003, Excel XP, Excel 2000

For Example:
Let's take a look at an example:

Based on the Excel spreadsheet above:

=Mod(A1, A2) =Mod(A1, A3) =Mod(34, A2)

would return 2

would return -7

would return 0

=Mod(34, 0) would return #DIV/0!

Você também pode gostar