CTS130 Spreadsheet Lesson 7 Using Logical and Financial Functions

Preview:

Citation preview

CTS130 Spreadsheet

Lesson 7

Using Logical and Financial Functions

Using the IF Function

With the IF function, your worksheet has basic analysis and decision-making capabilities. The IF function has three arguments:

If X, then Y; otherwise Z

The syntax for the IF function is:

=IF(logical test, value if true, value if false)

Logical test – the condition that is either true or false.

Value if true – this is what displays in the cell if the

condition is true

Value if false – this is what displays in the cell if the

condition is false

IF Function (cont’d)

The result of an IF function can:• Show a value such as 100, 25.50, etc.• Show a label such as “Yes,” “Overtime,” and “ ”• Compute a result such as B5*.25

Examples:

=IF(C5>50,C5*2,”None”)

=IF(B30<100,B30*.25,B30*.50)

=IF(G10<=0, “Incorrect”, “Correct”)

=IF(T35<>0, A15*B35, 0)

=IF(logical test, value if true, value if false)

Insert Function Dialog Box

Use the INSERT Menu > Function option

Use the Function Button

Use the AutoSum Button

IF Function - Dialog Box

Formula bar with IF statement

Formula bar with IF statement

NOTE: Instead of using the Function Dialog box, you may simply enter the function by manually keying it in.

Example

AND Function

Shows either true or false as a result. This function ignores labels and empty cells, so you use

them only with values. In an AND function, you can use multiple logical tests. All tests or expressions must be TRUE for the result cell to

show TRUE. Otherwise, it shows False.

Formula bar with AND statement

Formula bar with AND statement

AND Function

OR Function

Shows either true or false as a result. This function ignores labels and empty cells, so you use

them only with values. In an OR function, you can use multiple logical tests. Any one of your logical tests can be true for the result cell

to show TRUE. Otherwise, it shows False.

Formula bar with OR statement

Formula bar with OR statement

OR Function

NOT Function

Shows either true or false as a result. This function ignores labels and empty cells, so you use them

only with values. The reverse or opposite of your condition must be true for the

result to show TRUE. The NOT function has one argument.

NOT Function

Formula bar with NOT statement

Formula bar with NOT statement

Styles – set of formatting specifications for labels and values.

Format Menu > STYLE option

Click down-pointing arrow to select the style from a drop-down list as shown below.

Styles (cont’d)

The COMMA style shown here:

You can remove a style as well as your own formatting from a cell or range of cells. The cell or range them returns to the default Normal style.

Edit Menu > Clear > Formats

Styles (cont’d)

Modifying a Style

Page Breaks

Page break - a code telling printer to start a new page.

When a worksheet is too wide/too tall to fit on one page, Excel inserts an automatic page break.

This page break appears as a dashed line on the screen.

Page breaks are placed in accordance with the width of your worksheet, the default page margins, and the default paper size and orientation.

You can accept Excel’s location for page breaks or you can move the break to a new location.

Page Breaks (cont’d) In PRINT PREVIEW, click the “Page Break Preview” button. The pages are shown next to each other with a background

page number. The page break a blue dashed line (doesn’t print.)

You can click and drag the dotted blue line to adjust the break. The dotted line changes to a solid blue line when break is adjusted.

Inserting a Page Break

When you insert a page break, it is placed to the LEFT of the active cell or column.

INSERT Menu > Page Break

Removing a Page BreakYou can remove a manual page break and let Excel

insert its own page breaks if they are needed.

Position the pointer so that the current page break is to the left of the column where your pointer is located.

INSERT Menu > Remove Page Break.

Setting Print Titles FILE Menu > Page Setup

You can repeat labels in a column or row on each printed page.

Note that $A:$A appears in the dialog box as the range for print titles.

You key the labels one time. You can then have the labels repeated automatically on every page following the first page.

Page 1 showing the row labels.

Page 2 showing the repeated row labels.

Notice that the labels are repeated.

Center a Page Horizontally

Excel can automatically center a worksheet horizontally or vertically on the printed page.

FILE Menu > Page Setup > Margins tab

Page Centered Horizontally and Vertically

Footer Font and Page Numbers FILE Menu > Page Setup > Header/Footer Tab

Font Page Number

Pages

Date - Time

Financial Functions

Many of Excel’s financial functions use the following arguments:

Rate is the interest for the period. If you make monthly payments, you must divide the rate by 12 to find the monthly interest rate.

Nper is the total number of periods during which a payment is made. A five-year loan with monthly payments would have an Nper of 60 (12 months * 5 years)

PV is present value or the amount of the loan. It is the current cash value of the money transaction.

FV is future value or the cash balance at the end of the timer period.

Type specifies whether payments are made at the beginning or the end of the period.

PMT Function

The PMT Function can be used to determine monthly payments if you borrow money to buy an item.

FV FunctionThe FV (future value) function can be used to determine such things as how much you will have in your savings account at some point in the future if you make regular deposits.

NOTE: The result will be a negative number because FV function assumes the bank’s/lender’s point of view. This is money that they would pay to you.

Depreciation Functions Depreciation represents the decline in value of an asset.

For personal purchases, although you pay a certain amount for an item, it is not worth that much in future years because it has been used.

For business, depreciation can be used as an expense to offset income taxes.

Basic arguments:

Cost – original price of the item

Salvage – value of the item after is has been depreciated

Life – the number of periods over which the item will be depreciated

Period – the time for which depreciation is calculated

DB Function (declining balance)

The DB function calculates depreciation at a fixed rate and considers that the value is declining each year.

You calculate depreciation for each year separately.

DB for 2nd year

=DB($B$4,$B$5,$B$6,3)

NOTE:

You could copy the formula down through the remaining years by anchoring the consistent values. The period will change from 4 to 5, etc.

=DB($B$4,$B$5,$B$6,4)=DB($B$4,$B$5,$B$6,5)

Formatting Negative Numbers

Recommended