Advanced Formulas
-
Upload
naveenvpgmailcom -
Category
Documents
-
view
216 -
download
0
Transcript of Advanced Formulas
-
8/8/2019 Advanced Formulas
1/31
University Technology ServicesComputer Training
Advanced Formulas and Functions
Microsoft Excel 2003
Reference Guide
-
8/8/2019 Advanced Formulas
2/31
Copyright NoticeCopyright 2003 EBook Publishing. All rights reserved. No part of this publication may be reproduced, transmitted, or translated into any language, in any form or by any means, electronically or mechanical, including photocopying,recording, storage in a database or retrieval system, or otherwise, without the prior written permission of EBookPublishing.
Disclaimer We take great care to ensure the accuracy of these materials; however, EBook Publishing makes no warranty, express or implies, including without limitation any warranty concerning the adequacy, accuracy or completeness of such informationor material or the results to be obtained from using such information or material. EBook Publishing reserves the right torevise this publication and to make changes in its content at any time, without obligation to notify any person or entity of such revisions or changes.
-
8/8/2019 Advanced Formulas
3/31
2003 ComputerTrainingManual.com
MicrosoftExcel 2003TABLE OF CONTENTS
P ERFORMING C ALCULATIONS .....................................................................1Using Simple Formula ................................................................................................ 2
How To Enter A Formula Using Keyboard............................................................ 4How To Enter A Cell or A Range Reference Using Mouse................................... 4How To Use AutoSum To Calculate Total Quickly............................................... 5How To Use Relative References ........................................................................... 6How To Use Absolute References.......................................................................... 7
Using Simple Functions.............................................................................................. 9How To Enter A Function Directly ...................................................................... 11How To Use Insert Function................................................................................. 12
Using AutoCalculate And Labels ............................................................................. 14
How To Use AutoCalculate To Do Calculation Without Using Formula............ 14How To Accept Labels In Formulas..................................................................... 15How To Use Label (Natural Language) In Formula............................................. 16
U SING A DVANCED F UNCTIONS ..................................................................17
Using Financial Functions ........................................................................................ 18How To Use PMT Function.................................................................................. 19
Using Logical Functions ........................................................................................... 21How To Use Logical Test ..................................................................................... 22How To Use IF Function To Return Text............................................................. 23How To Use IF Function To Return A Value....................................................... 24
How To Use Nested IF Function .......................................................................... 25How To Use OR Function .................................................................................... 26How To Use AND Function ................................................................................. 27How To Use COUNTIF Function......................................................................... 28
-
8/8/2019 Advanced Formulas
4/31
2003 ComputerTrainingManual.com
1
MicrosoftExcel 2003ADVANCED FORMULAS
PerformingCalculations
Objectives:When you have completed theselessons, you will be able to:
Understand formulas
Use simple calculations
Use AutoSum to add
Apply Absolute and Relative References
Create formula with functions
Use AutoCalculate and Labels
-
8/8/2019 Advanced Formulas
5/31
2003 ComputerTrainingManual.com
2
MicrosoftExcel 2003ADVANCED FORMULAS
Using Simple Formula
Formula helps you to calculate and analyze data on your worksheet. Formula containsoperands and operators as illustrated below.
Formula:
Operand ExampleConstant value 2Cell reference A1Range reference A1:B2Label Jan SalesRange name RevenueFunction Sum(A1:B4)
Operators: SymbolsAddition +Subtraction -Multiplication *Division /Percent %Exponential ^
Microsoft Excel syntax, includes an equal sign (=) followed by the operands and theoperators like
= 2 + 3= A1 - B6=3 * A5=Sales / Months=5 ^ 4
OperandOperand
Operator
a + b
-
8/8/2019 Advanced Formulas
6/31
2003 ComputerTrainingManual.com
3
MicrosoftExcel 2003ADVANCED FORMULAS
The order of the elements in a formula determines the final result of the calculation.Excel performs the operations from left to right according to the order of operator
precedence.
Operator precedence
Operator Description: (colon)
(single space), (comma)
Reference operators
Negation (as in 1)% Percent^ Exponentiation
* and / Multiplication and division+ and Addition and subtraction& Connects two strings of text (concatenation)= < > = Comparison
For example:= 2 + 3 * 2equals to 8Not 10 because Excel calculates multiplication before addition.
You can control the order of calculation by using parentheses to group operations thatshould be performed first.
For example:= (2 + 3) * 2equals to 10
-
8/8/2019 Advanced Formulas
7/31
2003 ComputerTrainingManual.com
4
MicrosoftExcel 2003ADVANCED FORMULAS
How To Enter AFormula UsingKeyboard
1. Click the cell that youwant to place theformula.
2. Type = (equal sign)and the formula.
3. Press .
1. Click the cell B5 .You want to enter a formula in this cell.
2. Type =B2+B3+B4 . The formula always starts with = (equal sign) as illustrated below.
3. Press .The total is calculated. If you click at the cell B5, the formula appears inthe formula bar.
How To Enter ACell or A RangeReference UsingMouse
1. Click the cell that youwant to place theformula.
2. Type = (equal sign)and use the mouse toclick at the cell or range references.
3. Press .
1. Click the cell B5 .You want to enter a formula in this cell.
2. Type = , click B2 , type + , click B3 , type + , click B4 .The formula appears, as shown below.
3. Press .The total is calculated.
SUMMARY
SUMMARY
-
8/8/2019 Advanced Formulas
8/31
2003 ComputerTrainingManual.com
5
MicrosoftExcel 2003ADVANCED FORMULAS
How To UseAutoSum ToCalculate TotalQuickly
1. Click the cell that youwant to place theformula.
2. Click .3. Press .
1. Click the cell B5. You want to calculate the contents in the cells above the active cell.
2. Click AutoSum button on the Standard toolbar.The formula is created automatically. Excel adds the number above theactive cell. If no number is found above the active cell, the numbers on theleft of the active cell are added up. The formula appears, as shown below.
3. Press .The total is calculated.
If the active cell is not located at thebottom or on the right of a list of numbers. You can still use theAutoSum button to calculate the total.
Click at the cell and click the AutoSum button. Formula appears asdisplayed on the right.
2) Click to select the cells to becalculated.
3) Press to get the total.
SUMMARY
-
8/8/2019 Advanced Formulas
9/31
2003 ComputerTrainingManual.com
6
MicrosoftExcel 2003ADVANCED FORMULAS
How To UseRelativeReferences
1. Click the cell thatcontains the formulayou want to copy.
2. Use AutoFill or Copy command to copy theformula to another cell.
3. The destination cell
contains referencesthat are relative to thesource formula.
If you drag theAutoFill Handle downor copy the formuladown, the rangereference B2:B4changes to B3:B5.This means the rownumber changes,while the columnletter remainsunchanged.
By default, when a formula is created, references to cells or ranges are usually based on their position relative to the cell
that contains the formula.
When you copy the formula, Excel will automatically pastethe adjusted references in the destination cells relative to theposition of the formula. Before you begin, type in the data for Feb column, as shown below.
1. Click the cell B5. You are going to copy the formula =SUM(B2:B4) in cell B5 to cell C5.
2. Drag the AutoFill Handle to the right to fill the cell C5 withthe formula.
AutoFill Handle is the small dot at the lower-right corner of the active cell B5.
The formula is copied from cell B5 to cell C5.
3. Click the cell C5 to see the formula =SUM(C2:C4).The range reference B2:B4 changes to C2:C4 when the formula is copied to the right. Since you drag the AutoFill to the right, the column letter changes relatively to the right but row number remains unchanged.
SUMMARY
TIPS
-
8/8/2019 Advanced Formulas
10/31
2003 ComputerTrainingManual.com
7
MicrosoftExcel 2003ADVANCED FORMULAS
How To UseAbsoluteReferences
1. Click the cell thatcontains the formula.
2. Edit the formula byadding dollar signs`$' to the cellreference you want toset as an absolutereference.
Use absolute references if you do not want Excel to adjustthe references in the formula when copying a formula to
another cell.
Before you begin, type in the Sales column and the UnitPrice, as shown below. The formula in cell C2 is =B2*B7 .When you copy the formula to cell C3 using AutoFill, theformula changes from =B2*B7 to =B3*B8 . However, you donot want B7 to change to B8 because the unit price is storedin cell B7. So, you need to set the cell reference B7 as anabsolute reference. This prevents the cell reference fromchanging when you paste the formula to another cell. To setthe cell reference as an absolute reference, add dollar signs($) in the cell reference.
1. Click the cell C2 .You are going to copy the formula =B2*B7 to C3:C5.
2. Click the AutoFill Handle at cell C2 and drag to fillC3:C5 .This is to find the sales for Mary, Steve and Total. You will get wrong results as shown below.
3. Click the cell C3 to see the formula.The formula is =B3*B8 , which is a relative reference of =B2*B7 in cell C2.However, the correct formula should be =B3*B7 instead.
SUMMARY
-
8/8/2019 Advanced Formulas
11/31
2003 ComputerTrainingManual.com
8
MicrosoftExcel 2003ADVANCED FORMULAS
You may press function key to apply$ to B7 instead of typing the dollar sign($) manually in theformula bar. Click atB7 in the formula bar and press .
If you press toapply $, it will firstchange B7 to $B$7 . If you press again, it changes to
B$7 and then to $B7 and finally back toB7 .
$B sets the column Bto be absolute.
$7 sets the row 7 tobe absolute.
4. Click the cell C2 again. Change the formula in cell C2 byadding dollar signs ($) to the cell reference B7 . The newformula should be =B2*$B$7 .This is to set the cell B7 to become an absolute reference. You canchange the formula in the formula bar.
5. Click and drag the AutoFill handle down to cell C5. The sales are recalculated.
Click at cell C3, the formula appears to be =B3*$B$7. The cell reference B7 (absolute reference) remains unchanged while cell reference B2 (relativereference) changes to B3.
TIPS
-
8/8/2019 Advanced Formulas
12/31
2003 ComputerTrainingManual.com
9
MicrosoftExcel 2003ADVANCED FORMULAS
Using Simple Functions
Functions are used to simplify and shorten formula. Functions are predefined formulasthat perform calculations with specific input (arguments) in a particular structure.
For example:
=A1+A2+A3+B1+B2+B3+C7
could be replaced using functions as below:
=SUM(A1:B3,C7)
A function begins with the function name , followed by an opening parenthesis , thearguments (multiple arguments are separated using commas), and ends with a closingparenthesis .
An Equal sign = is used if the function is at the beginning of a formula.Arguments can also be constants, formulas, or functions.
For Example:The SUM function adds up the values found within the parentheses.=SUM(1,4,7) equals 12
Comma separators arguments
Equal sign
Function name
Arguments
-
8/8/2019 Advanced Formulas
13/31
2003 ComputerTrainingManual.com
10
MicrosoftExcel 2003ADVANCED FORMULAS
Other commonly used functions are shown in the following table.
Function Name Description Result
MAX() Find the largest number from the arguments =MAX(20,25,15)Result: 25
MIN() Find the smallest number from the arguments =MIN(20,25,15)Result: 15
AVERAGE() Find the average for the arguments =MIN(20,25,15)Result: 15
COUNT() Counts number of cells that contains number fromthe arguments
=COUNT(1,4,B,3,20)Result: 4
COUNTA() Counts number of cells that are not empty from
the arguments
=COUNTA(1,4,B,3,20)
Result: 5
Some functions do not need an argument in the parenthesis.
Function Name Description Result
Today() Returns current date =Today()Result: 9/4/03
Now() Returns current date and time =Now()Result: 9/4/03 12:20
-
8/8/2019 Advanced Formulas
14/31
-
8/8/2019 Advanced Formulas
15/31
2003 ComputerTrainingManual.com
12
MicrosoftExcel 2003ADVANCED FORMULAS
How To UseInsert Function
1. Click the cell whereyou want to place thefunction.
2. Click .3. Click the Select a
category drop-downarrow, and then clickthe function categoryyou want.
4. In the Select afunction box, double-click the function youwant.
5. Click .6. Press twice.
1. Click the cell C6 This is where you want to place the total. Press to delete thecontent in cell C6, if any.
2. Click Insert function button on the formula bar.The Insert Function dialog box appears.
3. Click the select a category drop-down arrow and clickMost Recently Used from the list.
A list of functions in that category appears in the Select a function box.For the Most Recently Used category, the functions listed depend on thelatest functions being used in that specific computer.
4. In the Select a function box, double-click the SUM function . If the Sum function does not appear in the list, you can find the Sumfunction in the All Function category. The Function Arguments dialog box appears after you double-click the function you want.
SUMMARY
-
8/8/2019 Advanced Formulas
16/31
2003 ComputerTrainingManual.com
13
MicrosoftExcel 2003ADVANCED FORMULAS
If there is more than 1argument (multipleranges of cells), useNumber2 box for thesecond range.
5. In Number1 box, click Select Range button.The Function Arguments dialog box collapses, so that you can select the
range you want more easily. You do not need to collapse the dialog box if you can see the cell range on the screen.
6. Select the range B2:B4 . Notice that the range reference appears in the formula bar.
7. Press twice to confirm.The total is calculated, as shown below.
TIPS
-
8/8/2019 Advanced Formulas
17/31
2003 ComputerTrainingManual.com
14
MicrosoftExcel 2003ADVANCED FORMULAS
Using AutoCalculate And Labels
You can perform some simple calculation like finding the total, the maximum, theminimum or the average of a range without having to create a formula.
Before you begin, type the table as shown below.
How To UseAutoCalculateTo DoCalculationWithout UsingFormula
1. Select the range of cells.
2. Right-click thecalculation thatappears on the statusbar.
3. Click to select thefunction you want.
1. Select the range B2:B4 .You want to find the total sales for Jan, as show below.
You can see that the total value Sum=610 appears on the status bar. Thedefault function for the selected range is Sum function.
2. Right-click the result on the status bar. A shortcut menu appears to show you all the functions available for AutoCalculate.
3. Click the Max function to find the largest value of therange.The maximum value Max=230 appears at the status bar.
SUMMARY
-
8/8/2019 Advanced Formulas
18/31
2003 ComputerTrainingManual.com
15
MicrosoftExcel 2003ADVANCED FORMULAS
How To AcceptLabels InFormulas
1. Click Tools >>Options .
2. Click the Calculation tab.
3. Under Workbookoptions , click toselect the Acceptlabels in formulascheck box.
4. Click the OK button.
Instead of using cell references in formula, you can also use
the labels if the data is arranged in a table. By default, Exceldoes not interpret the data as labeled in a table unless youenable the option Accept labels in formulas. Thus, you haveto enable the option before using the label in the formulas.
1. From the menu, click Tools >> Options .The Options dialog box appears.
2. Click the Calculation tab. Under Workbook options ,click to select the Accept labels in formulas checkbox.This enables the option so that Excel could use the column and row heading as the label for the data in a table.
3. Click the OK button.Labels are now accepted in formulas.
SUMMARY
-
8/8/2019 Advanced Formulas
19/31
2003 ComputerTrainingManual.com
16
MicrosoftExcel 2003ADVANCED FORMULAS
How To Use
Label (NaturalLanguage) InFormula
1. Click the cell that youwant to place theformula.
2. Type in a formulacontains labels that
comprise of the tablecolumn headings androw headings.
3. Press .
1. In the cell D6 , type the formula =SUM(Jan) .Excel uses the column heading as the label for all the values that appear under the column heading. In this example, Jan is used as the label torepresent the numbers in range B2:B4.
2. Press .The total for Jan appears in cell D6.
3. In the cell D7 , type the formula =Jan John+Mar John .Jan John is the label for cell B2 and Mar John is the label for cell D2.
Alternatively, you can also use the formula =John Jan+John Mar.
4. Press .The total for John in Jan and Mar appears in cell D7, as shown below.
SUMMARY
-
8/8/2019 Advanced Formulas
20/31
2003 ComputerTrainingManual.com
17
MicrosoftExcel 2003ADVANCED FORMULAS
UsingAdvanced
Functions
Objectives:When you have completed theselessons, you will be able to:
Use PMT function
Use ABS function
Build logical test function
Use IF function to return a text
Use IF function to return a value
Use nested IF function
Use OR function
Use AND function
Use COUNTIF function
-
8/8/2019 Advanced Formulas
21/31
2003 ComputerTrainingManual.com
18
MicrosoftExcel 2003ADVANCED FORMULAS
Using Financial Functions
Excel provides many useful Financial Functions to help you analyze and calculate your financialwork such as PMT().
PMT(Rate,Nper,Pv,Fv,Type)- calculates the periodic payment for a loan on a mortgage, house etc, base on a constantpayments and a constant interest rate.
Argument Description
Rate Interest Rate (If the Nper refer to month, the yearly rate should bedivided by 12)
Nper Number of paymentPv Present value The loan amount currently worthFv Future value The balance you wish to attain after the final
payment. Assume to be 0 (zero) if leave blank.Type 0 (zero) payment is due at the end of the payment period
1 (one) payment is due at the beginning of the payment periodAssume to be 0 (zero) if leave blank.
Before you begin, enter the following table in a new worksheet.
-
8/8/2019 Advanced Formulas
22/31
2003 ComputerTrainingManual.com
19
MicrosoftExcel 2003ADVANCED FORMULAS
How To UsePMT Function
1. Click the cell for themonthly payment.
2. Click .3. In the select a
category box, clickFinancial . In theSelect a function list box, click PMT .
4. Click the OK button.5. Enter the value in the
Rate box, Nper boxand Pv box.
6. Click the OK button.
1. Click the cell B6 .You want to calculate the monthly payment to the bank.
2. Click Paste Functions button on the formula bar.The Insert Function dialog box appears.
3. In the select a category box, click Financial . In theSelect a function list box, click PMT.The settings are shown as shown below.
4. Click the OK button. A dialog box appears.
SUMMARY
-
8/8/2019 Advanced Formulas
23/31
2003 ComputerTrainingManual.com
20
MicrosoftExcel 2003ADVANCED FORMULAS
5. In the Rate box, type B4/12 .In the Nper box, type B5 and in the Pv box, type B3 .Rate, Nper and Pv arguments are compulsory. Fv and Type are optional
6. Click the OK button.The monthly payment is calculated. The monthly payment appears as anegative value in a bracket by default. If you wish to change it to a positivevalue, use Abs function.
-
8/8/2019 Advanced Formulas
24/31
2003 ComputerTrainingManual.com
21
MicrosoftExcel 2003ADVANCED FORMULAS
Using Logical Functions
Excel provides many useful Logical Functions to help you compare the values or expressionthat Excel can evaluate as TRUE or FALSE. Excel then uses the results to perform actions or return the answers you are looking for.
-
8/8/2019 Advanced Formulas
25/31
2003 ComputerTrainingManual.com
22
MicrosoftExcel 2003ADVANCED FORMULAS
How To UseLogical Test
1. Click the cell2. Enter a comparison
formula.3. Press .
If the total sales moreor equal to the target(C2>=B2), the logicaltest will return theresult TRUE,otherwise it will returnFALSE.
Use IF function if youwant to customize theword TRUE or FALSEas the result.
Logical test is to compare the values or expression that Excelcan evaluate as TRUE or FALSE .
1. Click the cell D2 . Enter the formula =C2>=B2 This formula compares the 2 value to evaluate as TRUE or FALSE.
2. Press .The result appears.
3. Click cell D2 and drag the AutoFill handle down to cellD5.The AutoFill copy the formula down, as shown below .
SUMMARY
TIPS
-
8/8/2019 Advanced Formulas
26/31
2003 ComputerTrainingManual.com
23
MicrosoftExcel 2003ADVANCED FORMULAS
How To Use IFFunction ToReturn Text
1. Click the cell2. Enter =IF(logical text,
text_if_true,text_if_false).
3. Press .
Use quotation mark () for the text stringresult in the IFfunction
You use IF function to perform an action that meets thecondition.
=IF (logical test, value_if_true, value_if_false) - Returns the value_if_true if the condition in logical test istrue, returns value_if_false if the condition in logical test isfalse .
Argument Description
Logical test Any value or expression that Excel canevaluate as TRUE or FALSE
Value_if_true Value that will be returned if logical test istrue. Return the word TRUE if leave blank.
Value_if_false Value that will be returned if logical test isfalse. Return the word FALSE if leave blank.
1. Click the cell E2 . Enter the formula
=IF(C2>=B2,Yes,No). The formula means if C2 more or equals to B2, display Yes, else display No.
2. Press .The result appears.
3. Click cell E2 and drag the AutoFill handle down to cellE5 .The AutoFill copy the formula down, as shown below .
TIPS
SUMMARY
-
8/8/2019 Advanced Formulas
27/31
2003 ComputerTrainingManual.com
24
MicrosoftExcel 2003ADVANCED FORMULAS
How To Use IFFunction ToReturn A Value
1. Click the cell2. Enter =IF(logical text,
value_if_true,value_if_false).
3. Press .
No quotation mark () is needed for valueor formula
1. Click the cell F2 . Enter the formula =IF(E2="Yes",(C2-B2)*15%,0). The formula calculates the commission based on a commission rate of 15% fromthe Total Sales. This formula means if the cell E2 equals to Yes, the differenceof cell C2 and cell B2 will multiple by 15% commission rate, else no commissionis payable. Note: the column D is hidden in this illustration.
2. Press .The result appears.
3. Click cell F2 and drag the AutoFill handle down to cellF5 .The AutoFill copy the formula down, as shown below .
TIPS
SUMMARY
-
8/8/2019 Advanced Formulas
28/31
2003 ComputerTrainingManual.com
25
MicrosoftExcel 2003ADVANCED FORMULAS
How To UseNested IFFunction
If you have a few conditions (logical tests) and a few returnvalues , you may use nested IF function (an IF function within
another IF function). You can nest up to 7 (seven) IFfunctions.
For example ,$200 bonus is given to those who earn commission > $1000.$100 bonus is given to those who earn commission > $500.No bonus is given to those who earn commission 1000,200,IF(F2>500,100,0)) This formula means that if the commission is more than 1000, than 200 bonus isgiven, else if the commission is in between 500-1000, 100 bonus is given, elseno bonus will be given.
2. Press .The bonus is calculated
3. Click cell G2 and drag the AutoFill handle down to cellG5 .The AutoFill copy the formula down, as shown below .
-
8/8/2019 Advanced Formulas
29/31
2003 ComputerTrainingManual.com
26
MicrosoftExcel 2003ADVANCED FORMULAS
How To Use ORFunction
=OR(Logical_test1,Logical_test2,)To evaluate if ANY of the arguments (logical tests) is
TRUE . You can enter up to 30 arguments in the function.As long as one of the arguments is TRUE, it will return aTRUE.
Argument Description
Logical_test Any value or expression that Excel canevaluate as TRUE or FALSE
Example Return
OR(TRUE,TRUE,TRUE) TRUE
OR(TRUE,TRUE,FALSE) TRUEOR(FALSE,TRUE,FALSE) TRUE
OR(FALSE,FALSE,FALSE) FALSE
1. Click the cell D7 . Enter the formula =OR(D2:D5) The formula validate if ANY of the content in D2 to D5 is TRUE.
2. Press .The answer is TRUE because there is at least one TRUE item in the list.
-
8/8/2019 Advanced Formulas
30/31
-
8/8/2019 Advanced Formulas
31/31
MicrosoftExcel 2003ADVANCED FORMULAS
How To UseCOUNTIFFunction
COUNTIF(range,criteria)Counts the number of cells within the range that meets the
criteria.
Argument Description
range Cells that you want to compare with the criteria
criteria A condition in a form of text, number or expressionthat defines which cells will be counted
1. Click the cell D9 . Enter the formula=COUNTIF(D2:D5,TRUE) .The formula means count the number of TRUE items in the list.
2. Press .The result shows that there are 3 TRUE items in the list.