Example Using Excel's STANDARD DEVI ATI ON and AVERAGE Functions:
For help with this example, see the image above. 1. Enter the following data into cells E1 to E6: 11, 12, 13, 14, 15, 16. 2. In cell D7 enter the heading Average: and in cell D8 Std Dev: Calculating the Average Value 1. Click on cell E7 - the location where the AVERAGE function will be entered. 2. Click on the Formulas tab. 3. Choose More Functions > Statistical from the ribbon to open the function drop down list. 4. Click on AVERAGE in the list to bring up the function's dialog box. 5. Drag select cells E1 to E6 in the spreadsheet to enter the range into the dialog box. 6. Click OK. 7. The answer 13.5, which is the average value for the data in cells E1 to E6, should appear in cell E7. Calculating the Standard Deviation 1. Click on cell E8 - the location where the STDEV function (standard deviation) will be entered. 2. Click on the Formulas tab. 3. Choose More Functions > Statistical from the ribbon to open the function drop down list. 4. Click on STDEV in the list to bring up the function's dialog box. 5. Drag select cells E1 to E6 in the spreadsheet to enter the range into the dialog box. 6. Click OK. 7. The answer 1.870828693 should appear in cell E7. 8. This number (approximately 1.87) represents the standard deviation of each number in the list from the average value of 13.5. 9. When you click on cell E8 the complete function = STDEV ( E1:E6 ) appears in the formula bar above the worksheet.
Formulas to calculate Loan payments in Microsoft Excel
CATEGORY - Excel Financial Formulas VERSION - All Microsoft Excel Versions Formulas that calculate loan payments, principal, interest and more are found in the financial category in the Paste Function dialog box. In the screen shot is a list of functions and necessary syntax for loan calculations. See the formulas in the gray cells, and the syntax in rows 12-16. Syntax for loan calculation functions Rate - The interest rate per period. Per - The period for which the interest rate is calculated. Nper - The total number of payments. Pv - The present value, the total amount that a series of future payments is worth now. Type - The timing of the payment, either at the beginning or end of the period. Numbers 0 or 1 represent the payment date. The number 0 represents payment at the end of the period, and the number 1 represents payment at the beginning of the period. The default (empty argument) is 0. The calculation is at the end of the period. PMT (Rate, Nper, -Loan Amount) Calculates the payment for a loan based on constant payments and a constant interest rate. Returns the regular monthly payment on the loan (principal + interest) when the interest for each of the monthly payments is constant. Example: The principal of a loan is $100,000, and the term of the loan is three years. The monthly payment during the term of the loan is calculated at $3,227; see column B in the figure below. PPMT (Rate, Which Period, Nper, -Loan Amount) Returns the amount on the principal for a given period for a loan based on periodic, constant payments and a constant interest rate. Returns the sum of the principal within the monthly payment (the monthly payment is comprised of the principal + interest). See various examples of calculations in column C, rows 8:10, and the formula syntax in rows 14:16. IPMT (Rate, Which Period, Nper, -Loan Amount) Returns the interest payment for a given period for a loan based on periodic, constant payments and a constant interest rate. Returns the amount of the interest within the monthly payment (the monthly payment is comprised of the principal + interest). See the calculation in cell G11 and the formula syntax in G13. NPER (Rate, Pmt, -Loan Amount) Returns the number of loan payments with a constant interest rate. See the formula syntax in D12. RATE (Nper, Pmt, -Loan Amount) Returns the interest rate per period of a loan. RATE is calculated by iteration and can have zero or more solutions. Returns the percentage of interest on the loan, when the number of payments is constant. PV (Rate, Nper, Pmt) PV is the present value the total amount that a series of future payments is worth now. Returns the current value for a series of payments with a constant interest rat
Calculating Future Value Using Excel's PMT Function
The PMT function, one of Excel's Financial functions, can be used to calculate the payments for a loan or the future value of an investment. The syntax for the PMT function is: = PMT ( rate , nper , pv , fv , type ) rate - the annual interest rate for the loan. nper - the total number of payments to be made on the investment. pv - the present value of the investment. For future value this argument is omitted. fv - future value - the value of the investment at the end of the investment period. type - indicates when payments are made: "0" (or omitted) - at the end of the period ie: end of the month. "1" - at the beginning of the period ie: beginning of the month. Example Using Excel 2007's PMT Function to Find Future Value: Note: In this example, the type argument has been omitted (see the image to the right). 1. Enter the following data into cells:
D2 - Rate: D3 - # of payments: D4 - Pv: D5 - Future value: D6 - Payment: E2 - 7 E3 - 24 E4 - 0 E5 - $10,000.00 2. Click on cell E6 - the location where the results will be displayed. 3. Click on the Formulas tab. 4. Choose Financial functions > PMT from the ribbon to bring up the function's dialog box. 5. Click on the Rate line in the dialog box. 6. Click on cell E2 in the spreadsheet. 7. After the E2, type a forward slash " / " followed by the number 12 in the Rate line of the dialog box. This gives you the interest rate per month. 8. Click on the Nper line ( # of payments ) in the dialog box. 9. Click on cell E3 in the spreadsheet. 10. Click on the Pv line in the dialog box. 11. Click on cell E4 in the spreadsheet. 12. Click on the Fv line in the dialog box. 13. Type a minus sign ( - ) and then click on cell E5 in the spreadsheet. 14. Click OK in the dialog box. 15. The payment amount - $389.39 appears in cell E6. 16. When you click on cell E6 the complete function = PMT ( E2/12 , E3 , E4 , -E5 ) appears in the formula bar above the worksheet. Calculating Loan Payments Using Excel's PMT Function
The PMT function, one of Excel's Financial functions, can be used to calculate the payments for a loan or the future value of an investment. The syntax for the PMT function is: = PMT ( rate , nper , pv , fv , type ) rate - the annual interest rate for the loan. nper - the total number of payments for the loan. pv - the present value or the amount borrowed or the "principal of the loan. fv - future value - for a loan this will be $0.00. For loans this argument can be omitted. type - indicates when payments are due: "0" (or omitted) - at the end of the period ie: end of the month. "1" - at the beginning of the period ie: beginning of the month. Example Using Excel 2007's PMT Function to Calculate Loan Payments: Note: In this example, both the future value and type arguments have been omitted (see the image to the right). 1. Enter the following data into cells:
D2 - Rate: D3 - # of payments: D4 - Principal: D5 - Payment: E2 - 7% E3 - 24 E4 - $5,000.00 2. Click on cell E5 - the location where the results will be displayed. 3. Click on the Formulas tab. 4. Choose Financial functions > PMT from the ribbon to bring up the function's dialog box. 5. Click on the Rate line in the dialog box. 6. Click on cell E2 in the spreadsheet. 7. After the E2, type a forward slash " / " followed by the number 12 in the Rate line of the dialog box. This gives you the interest rate per month. 8. Click on the Nper line in the dialog box. 9. Click on cell E3 in the spreadsheet. 10. Click on the Pv line in the dialog box. 11. Type a minus sign ( - ) and then click on cell E4 in the spreadsheet. 12. Click OK in the dialog box. 13. The answer $223.86 appears in cell E5. 14. When you click on cell E5 the complete function = PMT ( E2/12 , E3 , - E4 ) appears in the formula bar above the worksheet.
Excel's VLOOKUP Function
Using Excel's VLOOKUP Function
Excel's VLOOKUP function, which stands for vertical lookup, is used to find specific information that has been stored in a spreadsheet table. IF you have an inventory list of parts or a large membership contact list, VLOOKUP can help you find data that matches specific criteria such as the price of a specific item or a person's phone number. VLOOKUP Example Note: Refer to the image above for more information on this example. The syntax of the VLOOKUP function is covered in detail on page two. =VLOOKUP("Widget",D4:E9,2,False) "Widget" - this VLOOKUP function is looking for the price of Widgets. D4 : E9 - it is looking for this information in the data table located in cells D4 to E9. 2- VLOOKUP is looking for the price in the second column of the table. False - indicates that only an exact match to the lookup _value "Widget" will be accepted. The VLOOKUP function returns the results of its search - $14.76 - in cell D1. =VLOOKUP(lookup_value,table_array,col_index_num,range_lookup) Excel VLOOKUP Function Syntax: lookup _value: This argument is the value that is searched for in the first column of the table array. The lookup _value can be a text string, a logical value (TRUE or FALSE only), a number, or a cell reference to a value. table_array: This is the range of data that the function searches to find your information. The table_array must contain at least two columns of data. The first column contains the lookup_values. These values can be text, numbers, or logical values. This argument is a named range or a reference to a range of cells. If you are using a reference to a range a cells, it is a good idea to use an absolute cell reference for the table_array. If you dont use an absolute reference and you copy the VLOOKUP function to other cells, there is a good chance you will get error messages in the cells the function is copied to. col_index_num: For this argument, enter the column number of the table_array from which you want data returned from. For example: if the col_index_num is 1, it returns a value from the first column in table_array; if the col_index_num is 2, it returns a value from the second column in table_array. 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. If TRUE or if this argument is omitted, VLOOKUP will use an approximate match if it cannot find an exact match to the lookup_value. If an exact match is not found, VLOOKUP uses the next largest lookup_value. If FALSE, VLOOKUP will only use an exact match to the lookup_value. If there are two or more values in the first column of table_array that match the lookup_value, the first value found is used. If an exact match is not found, an #N/A error is returned. Excel VLOOKUP Error Messages If the lookup_value is not found in the first column of the table_array, VLOOKUP returns the #N/A error value. If the col_index_num argument is greater than the number of columns in table_array, VLOOKUP returns the #REF! error value. If the table_array argument includes empty columns on the left of the table_array, VLOOKUP returns the #N/A error value. VLOOKUP Function Syntax
Using the Excel HLOOKUP Function VLOOKUP Error Messages
Using the Excel HLOOKUP Function Excel's HLOOKUP function, short for horizontal lookup, is used to find specific information that has been stored in a spreadsheet table. HLOOKUP works much the same the Excel VLOOKUP function, or Vertical Lookup. The only difference being that VLOOKUP searches for data in columns and HLOOKUP searches for data in rows. If you have an inventory list of parts or a large membership contact list, HLOOKUP can help you find data that matches specific criteria such as the price of a specific item or a person's phone number.
Excel HLOOKUP Example Note: Refer to the image above for more information on this example. The syntax of the VLOOKUP function is covered in detail on the next page. =HLOOKUP("Widget",$D$3:$G$4,2,False) "Widget" - this HLOOKUP function is looking for the price of Widgets. $D$3:$G$4 - it is looking for this information in the data table located in cells D3 to G4. 2- HLOOKUP is looking for the price in the second row of the table. False - indicates that only an exact match to the lookup _value "Widget" will be accepted. The HLOOKUP function returns the results of its search - $14.76 - in cell D1.
Excel HLOOKUP Function Syntax: =HLOOKUP(lookup_value,table_array,col_index_num,range_lookup) lookup _value: This argument is the value that is searched for in the first row of the table array. The lookup _value can be a text string, a logical value (TRUE or FALSE only), a number or a cell reference to a value. table_array: This is the range of data that the function searches to find your information. The table_array must contain at least two rows of data. The first row contains the lookup_values. This argument is either a named range or a reference to a range of cells. If you are using a reference to a range a cells, it is a good idea to use an absolute cell reference for the table_array. If you do not use an absolute reference and you copy the HLOOKUP function to other cells, there is a good chance you will get error messages in the cells the function is copied to. row_index_num: For this argument, enter the row number of the table_array from which you want data returned from. For example: if the row_index_num is 1, it returns a value from the first row of the table_array; if the row_index_num is 2, it returns a value from the second row of the table_array. range_lookup: A logical value (TRUE or FALSE only) that indicates whether you want HLOOKUP to find an exact or an approximate match to the lookup_value. If TRUE or if this argument is omitted, HLOOKUP will use an approximate match if it cannot find an exact match to the lookup_value. If an exact match is not found, HLOOKUP uses the next largest lookup_value. If FALSE, HLOOKUP will only use an exact match to the lookup_value. If there are two or more values in the first column of table_array that match the lookup_value, the first value found is used. If an exact match is not found, an #N/A error is returned.
Excel HLOOKUP Error Messages If the lookup_value is not found in the first row of the table_array, HLOOKUP returns the #N/A error value. If the row_index_num argument is greater than the number of rows in table_array, HLOOKUP returns the #REF! error value. If the table_array argument includes empty rows at the top of the table_array, HLOOKUP returns the #N/A error value.
Excel I SNUMBER Function
Excels ISNUMBER function is one of a group of Information Functions that can be used to find out information about a specific cell, worksheet or workbook. The ISNUMBER function's job is to determine if the data in a certain cell is a number or not. If the data is a number, a value of TRUE is returned by the function. If it is not a number, or the cell is empty, a FALSE value is returned. It should be noted that, for this function, dates and times are considered numbers. The syntax for the ISNUMBER function is: = ISNUMBER ( Value ) Value: Refers to the cell reference that is being checked. Example Using Excel 2007's ISNUMBER Function: For help with this example, see the image to the right. 1. Type a word, such as " January ", into cell D1. 2. Click on cell E1 - the location where the results will be displayed. 3. Click on the Formulas tab. 4. Choose More Functions > Information from the ribbon to open the function drop down list. 5. Click on ISNUMBER in the list to bring up that function's dialog box. 6. Click on cell D1 in the spreadsheet to enter the cell reference into the dialog box. 7. Click OK. 8. The value FALSE should appear in cell E1 because the data in cell D1 is not a number. 9. The complete function = ISNUMBER ( D1 ) appears in the formula bar above the worksheet when you click on cell E1. 10. To return a value of TRUE in cell E1, type a number in cell D1 or change the cell reference in the function to a cell that contains a number.
Excel 2007 I SBLANK Function
Excels ISBLANK function is one of a group of Information Functions that can be used to find out information about a specific cell, worksheet or workbook. The ISBLANK function's job is to check to see if a certain cell is empty or not. If the cell is empty, a value of TRUE is returned by the function. If data is later added to an empty cell the function will automatically update and return a FALSE value. The syntax for the ISBLANK function is: = ISBLANK ( Value ) Value: Refers to the cell reference that is being checked. Example Using Excel 2007's ISBLANK Function: Note: For help with this example, see the image to the right. 1. Type a number, such as " 3 ", or a word of text into cell C1. 2. Click on cell D1 - the location where the results will be displayed. 3. Click on the Formulas tab. 4. Choose More Functions > Information from the ribbon to open the function drop down list. 5. Click on ISBLANK in the list to bring up that function's dialog box. 6. Click on cell C1 in the spreadsheet to enter the cell reference into the dialog box. 7. Click OK. 8. The value FALSE should appear in cell D1 because cell C1 is not empty. 9. The complete function = ISBLANK ( C1 ) appears in the formula bar above the worksheet when you click on cell D1. 10. To return a value of TRUE in cell D1, delete the data in cell C1 or change the cell reference in the function to a cell that is empty.
Excel 2007 CELL Function
Excels CELL function is one of a group of Information Functions that can be used to find out information about a specific cell, worksheet or workbook. The CELL function's job is to give out information about a cell such as its formatting, the type of data it contains, and whether or not the cell is locked or protected. The syntax for the CELL function is: = CELL (info_type , reference ) Info_type: Refers to the type of cell information being sought. Only specific key words can be used for this parameter. A list of the keywords can be found in Excel's help file for this function. Reference: Refers to the cell reference that is being checked. Example Using Excel 2007's CELL Function: Note: For help with this example, see the image to the right. 1. Type a number, such as " 23 ", into cell D1. 2. Click on cell E1 - the location where the results will be displayed. 3. Click on the Formulas tab. 4. Choose More Functions > Information from the ribbon to open the function drop down list. 5. Click on CELL in the list to bring up that function's dialog box. 6. Enter the word "type" on the Info_type line of the dialog box 7. Click on the Reference line in the dialog box. 8. Click on cell D1 in the spreadsheet to enter the cell reference into the dialog box. 9. Click OK. 10. The letter " v " should appear in cell E1 to indicate that the data in the cell is a value. 11. The complete function = CELL ( " type " , D1 ) appears in the formula bar above the worksheet when you click on cell E1. Note: If cell D1 was empty, the letter " b " would appear in cell E1 to indicate that the cell was blank. If cell D1 contained a word of text, the letter " l " would appear in cell E1 to indicate that the cell contained a label. If cell D1 contained a date, the letter " v " would appear in cell E1 to indicate that the cell contained a value - dates are often considered to be values in Excel.
Excel TRANSPOSE Function Transpose Rows to Columns in Excel
The TRANSPOSE function, one of Excel's Lookup & Reference functions, is used to copy data located in a row into a column or copy data located in a column into a row. The syntax for the TRANSPOSE function is: { = TRANSPOSE ( Array )} Array - the range of cells to be copied from the horizontal to the vertical or vertical to the horizontal. The curly braces " { } " surrounding the function indicate that it is an array function. Example: Transpose Rows to Columns in Excel For help with this example, see the image above. 1. Enter the following data into cells: B1 - cabbages , B2 - carrots, B3 - radishes 2. Drag select cells D1 to F1 - the location where the results will be displayed. 3. Click on the Formulas tab. 4. Choose Lookup & Reference functions > TRANSPOSE from the ribbon to bring up the function's dialog box. 5. Drag select cells B1 to B3 on the spreadsheet. 6. Press the CTRL , SHIFT , and ENTER keys on the keyboard at the same time to enter the function as an array function. 7. The data in cells B1 to B3 should appear in cells D1, E1, and F1. 8. When you click on any of the cells D1 to F1 the complete function { = TRANSPOSE ( B1 : B3 )} appears in the formula bar above the worksheet.
Count the Number of Days Between Dates in Excel Excel DATEDI F Function
The DATEDIF function can be used to calculate the number of days between two dates in versions of Excel from 97 to 2010. An interesting point about DATEDIF is that it is an "undocumented" function which means it is not listed with other functions under the Formulas tab in Excel 2007 and 2010. To use the function you must type it manually into a cell on the worksheet rather than using the dialog box method available for other functions. The syntax for the DATEDIF function is: = DATEDIF ( start_date , end_date , unit ) The function has three arguments that need to be entered as part of the function: start_date - the first or starting date. end_date - the second or last date. unit - tells the function to find the number of days ("D"), complete months ("M"), or complete years ("Y") between the two dates. The unit argument can also be a combination of days, months, and years: "YM" - excludes years - calculates the number of months between two dates as if the dates were in the same year. "YD" - excludes years - calculates the number of days between two dates as if the dates were in the same year.
"MD" - excludes months - calculates the number of days between two dates as if the dates were in the same month and year. Count the Number of Days Between Dates Example Note: Commas are used as separators between the function's three arguments.< /p> For help with this example, see the image above. 1. Enter the following dates into cells D1 and D2: 1/30/2009 and 5/18/2009 2. Click on cell E1 in the spreadsheet - this is where the function will be located. 3. Type " = datedif " in cell E1. 4. Type an opening round bracket " ( " after the function name in cell E1. 5. Click on cell D1 in the spreadsheet to enter the cell reference of the start_date into the function. 6. Type a comma ( , ) in cell E1 after D1 to act as a separator between the two cell references in the function. 7. Click on cell D2 in the spreadsheet to enter the cell reference of the end_date into the function after the first comma. 8. Type a second comma ( , ) in cell E1 following the second cell reference as a second separator. 9. For the unit argument, type the letter D in quotes ("D" ) in cell E1 after the second comma to tell the function we want to know the number of days between the two dates. 10. Type the closing bracket " ) " . 11. Press the ENTER key on the keyboard. 12. The answer 108 should appear in cell E1 as there are 108 days between January 30th and May 18. 13. If you click on cell C1, the complete function = DATEDIF ( D1 , D2 , "D" ) appears in the formula bar above the worksheet. If you get a #NUM! error in the cell where your function is located, it means that the start_date is larger (later in the year) than the end_date.
Excel 2007 / 2010 Date Functions Working with Dates in Excel Dates are very important in spreadsheets. Not only is it important to add the current date to a spreadsheet when it is created, but much of the data stored in a spreadsheet is date related - such as the date of purchases or expenditures, the length of term of investments, and the date of scientific observations. Listed below are Excel date function tutorials. Many of these functions are used to calculate the difference between two dates, but each does it in a slightly different way. Excel NETWORKDAYS Function Excel Date Function Tutorials The NETWORKDAYS function can be used to count the number of working days between two dates - such as the start and end dates for a project. The function automatically removes weekend days from the total. Specific holidays can also be omitted. Excel DATEDIF Function Excel Date Function Tutorials The DATEDIF function can also be used to calculate the number of days between dates. This tutorial includes a step by step example of using the DATEDIF function in Excel. One way that it differs from the NETWORKDAYS function is that you can specify whether you want to count the difference in days, months, or years. Excel DAYS360 Function Excel Date Function Tutorials The DAYS360 Function, which is also used to calculate the number of days between two dates, is meant for use in accounting systems that are based on a 360-day year (twelve 30-day months). This tutorial includes an example that calculates the number of days between two dates using the DAYS360 function in Excel. Excel WORKDAY function Excel Date Function Tutorials The WORKDAY function can be used to calculate the end date or start date of a project for a given number of business days. This tutorial includes an example of calculating the end date of a project using the WORKDAY function in Excel. Excel EDATE Function Excel Date Function Tutorials The EDATE function can be used to calculate a due date of a project or investment that fall on the same day of the month as the date it was issued. Excel NOW Function Excel Date Function Tutorials The NOW function can be used to add the current time and date to a spreadsheet. You can choose to format the function to show either the current time or date or both. This tutorial includes an example of using the NOW function in Excel.
Excel Spreadsheets Mathematical Functions (59) In annex 8 you have found a description of all 50 Excel functions in the "Mathematical" category. Below is the list of the 9 most useful ones. See more on the very powerful SUMPRODUCT function in Excel in lesson 11, more on the SUBTOTAL function in lesson 13, more on the obsolete SUMIF function in lesson 15 and more on the new SUMIFS function in lesson 24. Functions What it Does SUM Adds its arguments SUMPRODUCT The most powerful and useful function in Excel ROUND Rounds a number to a specified number of digits ROUNDUP Rounds a number up, away from zero SUBTOTAL Returns a subtotal of a filtered list or database) TRUNC Truncates a number to an integer INT Rounds a number down to the nearest integer) ABS Returns the absolute value of a number MOD Returns the remainder from division POWER Returns the result of a number raised to a power SQRT Returns a positive square root In Excel 2007 and Up SUMIFS Adds the cells specified by one or many given criteria (SUMPRODUCT does better)
Tips Read other general tips on formulas in the Introduction to this section on Excel Functions and Formulas When you specify in the format of a cell that you want only 2 decimals Excel shows only 2 decimals (rounding up) BUT it still uses all the decimals. For example if in cell A1 you enter 2.1456 and format it to show only 2 decimals you will see 2.15. Now if in cell B1 you write the formula =A1 and make the format "General" you will see that Excel is using all 4 decimals (2.1456). This is why you will need to use functions like INT, TRUNC, ROUND, ROUNDUP and ROUNDDOWN if you want to use a specific number of decimals in your calculations. SUM =SUM(A1,B6,G6) or =SUM(A1+B6+G6) will return the sum of the values in cells A1, B6 and G6 =SUM(A1:A23) will return the sum of the values in cells A1 to A23 =SUM(A1:A23,F3:F34) will return the sum of the values in cells A1 to A23 plus the sum of the values in cells F3 to F34 In cell B2 of a yearly summary you want to sum the values in cells B2 of each of the monthly sheets. You have named your sheets "January" , "February" ....and you have used: =January!B2+February!B2+March!B2...+December!B2 You can also write this:=SUM(January:December!B2) TRUNC I don't use the INT or ROUNDDOWN functions because TRUNC does the same thing and more. The TRUNC function removes decimals without rounding. If you have 2.2 or 2.7 in cell A1 =TRUNC(A1,0) will return 2. Interestingly enough if you have 12,345 in B1 using a minus sign in the second argument of TRUNC =TRUNC(B1,-3) will return (12,000). Handy when you don't want to show the hundreds, the tens and units in a report. ROUND This function removes decimals rounding up the last decimal if the next one is 5 or over. So if you have 4.126 in cell A1 and use the formula =ROUND(A1,2) the result will be 4.13 if the value in A1 is 4.123 the result will be 4.12. ROUNDUP This function does the same thing as the function ROUND but always rounds up. So if you have 4.126 in cell A1 and use the formula =ROUNDUP(A1,2) the result will be 4.13 if the value in A1 is 4.123 the result will still be 4.13. ABS =ABS(A1) will return 5 if in cell A1 you have -5 or 5. This functions removes the sign. MOD The modulo is what is left after a division. =MOD(20,6) is 2 because you have 3 times 6 in 20 and the rest is 2. Notice the use of the comma to separate the arguments. See an application below in determining the age of a person. SUMPRODUCT The best kept secret in Microsoft Excel Here is what Excel says you can do with SUMPRODUCT: Let's say that you have a series of quantities in cells A1 to A5 and a series of unit prices in B1 to B5. With SUMPRODUCT you can calculate total sales with this formula: =SUMPRODUCT(A1:A5,B1:B5) Basically SUMPRODUCT sums A1 multiplied by B1 plus A2 multiplied by B2......... In the last 20 years I have used SUMPRODUCT for the purpose presented by Excel once or twice. But I use SUMPRODUCT daily to solve all kinds of other business data problems. It is the most powerful and useful function in Excel. Read chapter 13 that is entirely dedicated to SUMPRODUCT SUBTOTAL One of the giant steps (no. 2) that users make is when they learn about the database functionalities in Excel. When you know how to filter data then SUBTOTAL becomes a very interesting function. The function SUBTOTAL allows (among other operations) to count, to sum or to calculate the average of filtered elements of a database. The function requires two arguments, the second is the range covered by the function and the first is a number between "1" and "11" that specifies the operation to be executed (for ex. "1" is for average, "2" is for count and "9" is for sum). =SUBTOTAL(9,B2:B45) SQRT Extracting a square root is finding the number that multiplied by itself will result in the number that you are testing. Extracting a cubic root is finding the number that multiplied by itself two times will result in the number that you are testing. Extracting the fourth root is finding the number that multiplied by itself 3 times will result in the number that you are testing. To extract the square root of a number you will use a formula like: =SQRT(16) that will result in 4 because 4 multiplied by 4 is 16 or =SQRT(A1) that will also result in 4 if the value in cell A1 is 16. There are no specific Excel function to extract the cubic root or any other root. You have to trick the POWER function into doing it. POWER You can raise a number to a power (multiplying it by itself a certain number of times with this function. Hence: =POWER(4,2) will result in 16 (4 times 4) or =POWER(A1,2) will also result in 16 if the value in cell A1 is 4. You can to trick the POWER function into extracting the square root, the cubic root and any other root by submitting a fraction as second argument. For example you can extract the square root of 16 with the formula =POWER(16,1/2), the cubic root with =POWER(16,1/3) and so on. ROUND, SUM =ROUND(SUM(A1:A5),2) will return the sum of A1 to A5 rounded to 2 decimals. IF, MOD, TRUNC and & How many dozens are there in 106 units? With the number of units in cell A1 the formulas in B1: =TRUNC(A1/12,0) will return the number of complete dozens this formula in C1: =MOD(A1,12) will return the number of units left when the total number is divided by 12. If you want to present the result as "8 dozens and 10 units" in a single cell you will use the following formula combining math & Trig functions and the ampersand (& ) sign: =TRUNC(A1/12) & "dozens and " & MOD(A1,12) & " units" But what if there are 96 units and you don't want the result to show as "8 dozens and 0 units" but as "8 dozens" . You will then use this formula: =IF(MOD(A1,12)=0,TRUNC(A1/12) & " dozens" ,TRUNC(A1/12) & " dozens and " & MOD(A1 12) & " units" ) INT, TRUNC, MOD and & You want to determine the age of a person. If in cell " A3" you enter the date of birth, and in cell " B3" today's date, the following formula in " C3" would give you a good approximation of the age (plus or minus a few days): =INT((B3-A3)/365) & " years and " & TRUNC((MOD((B3-A3) 365))/30) & " months" If in cell A3 you enter the date of birth and in B3 you enter the formula =NOW() then each day when you open the workbook the age of the person is re-calculated in cell C3
Excel Spreadsheets Date and Time Functions (21) Note: The DATEDIF function does not show in the drop-down list of Excel functions (even in Excel 2007). In annex 2 you have found a description of all 21 Excel functions in the "Date and Time" category. Below is the list of the 9 most useful ones. Functions What it Does DATE Returns the serial number of a particular date DATEDIF Calculates the interval in days, months or years between two dates DAY Converts a serial number to a day of the month HOUR Converts a serial number to an hour MINUTE Converts a serial number to a minute MONTH Converts a serial number to a month SECOND Converts a serial number to a second TIME Returns the serial number of a particular time TODAY Returns the serial number of today's date YEAR Converts a serial number to a year NOW Returns the serial number of the current date and time WEEKDAY Converts a serial number to a day of the week The three most important things that you should remember when working with dates and times are: FORMAT, FORMAT and FORMAT. For example: If you have the dates 1/16/2005 in cell A1 and 1/22/2005 in cell B1 =B1-A1 in cell C1 will return: - 6 if the format of cell C1 is either "General" or "Number" - 1/6/1900 if the format of cell C1 is "Date" If you have a date in cell A1 and you want the date for the next day in cell B1 (formatted "date" ) the formula will be: =A1+1 to calculate the date of a week later the formula will be: =A1+7
Tips on Excel Date and Time Functions and Formulas If you enter the date 2/1/2005 in cell A1 and the number format of the cell is " General" you will see 38394. This is a " Serial number" and it is the way Excel works with dates and times. When you format the cell or use one of the functions below the serial number is viewed as times and dates To enter the date of the day no need to key it in, click and hold the CTRL key and click on the semi-colon key ( ) and there is the date. To enter the time, click and hold both the Shift and the CTRL keys and click on the colon key (:) and there is the time. Microsoft Excel doesn't work with dates and times, it works with serial numbers This means that when you enter 12/25/2004 Excel sees 38346 and if you enter 12/26/2004 Excel sees 38347. When you enter 12:00:00 PM Excel reads 0.5 and if you write 12:00:01 PM Excel reads 0.5000116. It is when you format the cell " Format/Cells" that you can read dates and times as we humans are accustomed to see them. By the way, I was born on 18373 at 0.25 so I am an Aries, and you? This being said, most functions of the category Date & Time are quite easy to work with when you use the right cell format. For example, when you are adding times and expect the total to be over 24 hours you must set the format of the result cell to " Format/Cells/Time/37:30:55" If you develop a time management application don't go through the trouble of working with clock time. Ask your people to enter either the number of hours worked by projects or the number of minutes then work with regular numbers. Much easier. Examples of basic Excel Date and Time Formulas DATEDIF One note to start. If you go to the menu " Insert/Function" you won't find this function. Excel has forgotten it. Here is how it works. Let's say that you have the dates 1/16/2005 in cell A1 and 1/16/2006 in cell B1: =DATEDIF(A1,B1,"y") will return 1 =DATEDIF(A1,B1,"m") will return 12 =DATEDIF(A1,B1,"d") will return 365 DAY, MONTH, YEAR With a date in A1 like 12/15/2005 the formulas =DAY(A1), =MONTH(A1) and =YEAR(A1) will return 15, 12 and 2005. SECOND, MINUTE, HOUR With a TIME in A1 like 1:31:45PM the formulas =SECOND(A1), =MINUTE(A1) and =HOUR(A1) will return 1, 31 and 45. WEEKDAY If the date in A1 is 1/16/2006 and it is a Monday the formula =WEEKDAY(A1) will return 2. For most users day 1 is Sunday. Check what your system says because in some cases day 1 is Monday. DATE, DAY, MONTH, YEAR With the DATE function, the arguments are always in the following order (year,month,day) whatever the date format specified in your regional parameters. With a date in cell A1 the formula to add a day is: =DATE(YEAR(A1),MONTH(A1),DAY(A1)+1) the formula to add a week is : =DATE(YEAR(A1),MONTH(A1)+1,DAY(A1)+7) the formula to add a month is: =DATE(YEAR(A1),MONTH(A1)+1,DAY(A1)) the formula to add a year is: =DATE(YEAR(A1)+1,MONTH(A1),DAY(A1)) the last day of the month preceding the date in A1 is: =DATE(YEAR(A1),MONTH(A1),DAY(A1)-DAY(A1)) the first day of the month following the date in A1 is: =DATE(YEAR(A1),MONTH(A1)+1,DAY(A1)-DAY(A1)+1) MONTH, DAY, NOW, AND and IF (Anniversary Alerts) My client wanted a spreadsheet that would tell her when it is the birthday of an employee. We created a spreadsheet with the names in column A and the dates of birth in column B. In column D was this formula =NOW() that changes date each day. In column C we put this formula: =IF(AND(MONTH(B1)-MONTH(D1)=0,DAY(B1)-DAY(D1)=0),"Anniversary","") We fine tuned: =IF(AND(MONTH(B1)-MONTH(D1)=0,DAY(B1)-DAY(D1)=0),"Happy Anniversary" ,IF(AND(MONTH(B1)-MONTH(D1)=0,DAY(B1)-DAY(D1)>0,DAY(B1)-DAY(D1)<7)," Anniversary coming" ,"" ))
Financial functions Function Description ACCRINT Returns the accrued interest for a security that pays periodic interest ACCRINTM Returns the accrued interest for a security that pays interest at maturity AMORDEGRC Returns the depreciation for each accounting period by using a depreciation coefficient AMORLINC Returns the depreciation for each accounting period COUPDAYBS Returns the number of days from the beginning of the coupon period to the settlement date COUPDAYS Returns the number of days in the coupon period that contains the settlement date COUPDAYSNC Returns the number of days from the settlement date to the next coupon date COUPNCD Returns the next coupon date after the settlement date COUPNUM Returns the number of coupons payable between the settlement date and maturity date COUPPCD Returns the previous coupon date before the settlement date CUMIPMT Returns the cumulative interest paid between two periods CUMPRINC Returns the cumulative principal paid on a loan between two periods DB Returns the depreciation of an asset for a specified period by using the fixed-declining balance method DDB Returns the depreciation of an asset for a specified period by using the double-declining balance method or some other method that you specify DISC Returns the discount rate for a security DOLLARDE Converts a dollar price, expressed as a fraction, into a dollar price, expressed as a decimal number DOLLARFR Converts a dollar price, expressed as a decimal number, into a dollar price, expressed as a fraction DURATION Returns the annual duration of a security with periodic interest payments EFFECT Returns the effective annual interest rate FV Returns the future value of an investment FVSCHEDULE Returns the future value of an initial principal after applying a series of compound interest rates INTRATE Returns the interest rate for a fully invested security IPMT Returns the interest payment for an investment for a given period IRR Returns the internal rate of return for a series of cash flows ISPMT Calculates the interest paid during a specific period of an investment MDURATION Returns the Macauley modified duration for a security with an assumed par value of $100 MIRR Returns the internal rate of return where positive and negative cash flows are financed at different rates NOMINAL Returns the annual nominal interest rate NPER Returns the number of periods for an investment NPV Returns the net present value of an investment based on a series of periodic cash flows and a discount rate ODDFPRICE Returns the price per $100 face value of a security with an odd first period ODDFYIELD Returns the yield of a security with an odd first period ODDLPRICE Returns the price per $100 face value of a security with an odd last period ODDLYIELD Returns the yield of a security with an odd last period PMT Returns the periodic payment for an annuity PPMT Returns the payment on the principal for an investment for a given period PRICE Returns the price per $100 face value of a security that pays periodic interest PRICEDISC Returns the price per $100 face value of a discounted security PRICEMAT Returns the price per $100 face value of a security that pays interest at maturity PV Returns the present value of an investment RATE Returns the interest rate per period of an annuity RECEIVED Returns the amount received at maturity for a fully invested security SLN Returns the straight-line depreciation of an asset for one period SYD Returns the sum-of-years' digits depreciation of an asset for a specified period TBILLEQ Returns the bond-equivalent yield for a Treasury bill TBILLPRICE Returns the price per $100 face value for a Treasury bill TBILLYIELD Returns the yield for a Treasury bill VDB Returns the depreciation of an asset for a specified or partial period by using a declining balance method XIRR Returns the internal rate of return for a schedule of cash flows that is not necessarily periodic XNPV Returns the net present value for a schedule of cash flows that is not necessarily periodic YIELD Returns the yield on a security that pays periodic interest YIELDDISC Returns the annual yield for a discounted security; for example, a Treasury bill YIELDMAT Returns the annual yield of a security that pays interest at maturity