0% found this document useful (0 votes)
38 views

Lec01 Intro Basics

This document summarizes topics that will be covered in OPIM 529 Lecture 1, including Excel basics, formulas like SUMPRODUCT, IF, COUNTIF and SUMIF, and using Excel for data analysis, graphing, simple databases, and quantitative modeling. Examples are provided on entering formulas, copying formulas, relative and absolute cell references, and logical functions. Best practices for good spreadsheet design like layout, formatting, comments and protection are also outlined.

Uploaded by

Mohsin Iqbal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

Lec01 Intro Basics

This document summarizes topics that will be covered in OPIM 529 Lecture 1, including Excel basics, formulas like SUMPRODUCT, IF, COUNTIF and SUMIF, and using Excel for data analysis, graphing, simple databases, and quantitative modeling. Examples are provided on entering formulas, copying formulas, relative and absolute cell references, and logical functions. Best practices for good spreadsheet design like layout, formatting, comments and protection are also outlined.

Uploaded by

Mohsin Iqbal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 41

OPIM 529

Lecture 1
Can Akkan

Topics
Excel basics SUMPRODUCT formula Conditional Counting and Summing
IF, COUNTIF and SUMIF formulas

MS Excel
It is one of the most important tools you will use in your education and work.
Data analysis
Average, minimum, maximum spending by customers?

Graphing data (for analysis and presentation)


Graph of age of customers versus amount spent by them.

MS Excel
Simple database functionality
Find the customers whose income is above $40,000, who are married and have at least one child.

Developing quantitative models for business problems


Where should I locate my warehouse to minimize transportation costs.

Regional Settings English (US)

Example 1
We enter a formula by first typing =
Revenue = Price x quantity sold

Most formulas refer to a cell by a cell reference


Cell reference B5 refers to the price of Mug 1
Lec1_ex5.mp4

Example1
You can copy and paste a formula
Goto cell D5 Press Ctrl + C (shortcut for copy) Go to cell D6 Press Ctrl + V (shortcut for paste) Select D7:D11 Press Ctrl + V to paste

Example 1
There are formulas to do certain common tasks, e.g. summation

Example 1
Now copy the SUM formula and paste it to cell D12. You should get the following:

Example 2
Type the following:
Cell B4: Price Cell C4: Quantity Cell D4: Revenue Cell B5: 3 Cell C5: 5

10

Example 2 - Entering a Formula


Lets calculate the revenue Recall: Excel formula starts with =

11

Example 2 - Copying Formula


Lets copy (Ctrl+C) and then paste (Ctrl+V) the revenue formula to
Cell E5 Cell D6 Cell E7

Press F2 when the cursor is on these cells


Where are the formulas referring to?

12

Example 2 -Relative Reference in Excel Formula

13

Example 2 - Copy-Paste the Range


Copy B4:D5 range to B10:D11

14

Example 2 - Using the $ sign in Formula


In cell D11 type =B$11*$C11 Now copy-paste the formula to
Cells E11,D12 and E13

15

Example 2 - The Effect of $ In Formulae

16

Example 3
Using SUMPRODUCT
Go to sumproduct worksheet Calculate total revenue
First, using multiplication and summation Then, using SUMPRODUCT

17

Example 3
In a cell if you press the function key F2 you
Get the display shown below
Color coded cell references

Can edit the formula directly within the cell.

18

Example 4
A retailers data on its customers and their purchases.
Note the comments entered for each column header.
Right-click the mouse select Insert Comment

Note the currency format used for Salary and AmountSpent

19

MS Excel Shortcuts
Knowing certain shortcuts can speed up the work you do in Excel dramatically. Select any cell in the table Press CTRL down arrow, then CTRL right arrow, then CTRL up arrow, etc.

20

Example 4
Task 1:
Insert a new column to the left of the table and title it "Customer ID".
There are at least 2 slightly different ways of doing this.

Fill the "Customer ID" column by numbers 1 through 1000


Fill in the first three entries 1, 2 and 3 Select these cells Double click on the fill handle when the cursor turns into a cross.
Excel fills in up to 1000 because there is a column with 1000 rows next to it.
21

Fill handle

MS Excel Shortcuts
When the range in a formula is long do not use the mouse the select it.
Use CTRL-SHIFT-arrow
typically down-arrow or right-arrow SHIFT lets you select multiple cells.

Similarly when you copy a long range.


Select with CTRL-SHIFT-arrow Copy with CTRL-C Paste with CTRL-V
22

Example 4
Task 2:
In cell B2 enter "Average" and then calculate the averages of columns C through I in cell C2 through I2.
In cell C2 the formula should be =AVERAGE(C3:C1003) Then copy the formula (can use drag handle) to the other cells.

Pay attention to the formats.


You can adjust significant digits by the buttons: You can copy the format of the currencies by the format painter

23

Example 4
Task 3:
Calculate total and average amount spent by male customers.
Use SUM formula to calculate the number of males Use SUMPRODUCT formula to calculate total amount spent by males: =SUMPRODUCT(I4:I1003, C4:C1003) Calculate average AmtSpent for males

24

Example 4
Task 4:
Copy and paste (in one step) the "Gender", "Married" and "Children" columns to columns P, Q and R.
CTRL lets you select multiple disjoint cells/ranges.
Use CTRL-Shift-down arrow to select Gender column Holding down CTRL key, left-click the mouse on top of Married column Press CTRL-Shift-down arrow to select Married column Do the same for Children column

Press CTRL C to copy the three columns Select cell P3 and then press CTRL V

25

Example 5 Logical Conditions in Excel


Video availbale in Media Gallery Type the following in cells A1, A2 and A3
=(1=1) =(1 > 3) =(3 <= 4)

Logical operators result in TRUE or FALSE


26

Example 6
Video availbale in Media Gallery Data on some households Objective: categorize utility expenses as normal or high
More than $250 -> high, otherwise normal

27

Example 6 Simple IF
Excels IF function IF(logical condition, returned value if condition is true, returned value if condition is false) In cell F3 type =IF(C3>$F$1, "high", "normal") " " symbols are used to denote that a text (called string in computer science) is being returned
28

Example 6 Simple IF
Value parts could also have
Empty Text: =IF(C3>$F$1,"high","") Number: =IF(C3>$F$1, 1, 0) Formula: = IF(C3>$F$1, D3*C3, (1-D3)*B3)

29

Example 6 Nested IF
Now we want to determine someone both with a high utility expense and owns her home. If BOTH conditions are TRUE then want 1 If AT LEAST ONE condition is FALSE then want 0 We will use two IF functions one within the other
30

Example 6 Nested IF
In cell G3 write =IF(F3="high",IF(D3=1,1,0),0)
One can write different nested IF functions that do the same job Think of alternative ways of doing this

31

Example 6 AND Function


Since we have multiple conditions that must be TRUE, we can use the AND function First go back to Ex 5 worksheet and in cell A4 type
=AND((1=1), (1>3))

Can also write


=AND(A1, A2) Try above in cell A5

In cell A6, type


=AND(A1,A3)
32

Example 6 AND Function


Now use IF and AND functions to determine people with both high utility expense and owns her home. In cell H3 write
=IF(AND(F3="high",D3=1), 1,0)

33

Example 7
No video in Media Gallery. Two useful functions with IF functionality COUNTIF(range, criteria) SUMIF(range, criteria, [sum range])
Note: parameter in square brackets is optional

34

Example 7

35

Good Spreadsheet Design


Useful spreadsheet models should have the following properties:
Must provide accurate results
cross-checking, batch totals, breaking down lengthy formulas into smaller steps can help reduce errors.

Must be understood both by their creators and users.


Clear and complete descriptions, consistent approach to layout

Be adaptable to changes Must be efficient for the user to locate and observe critical portions of it
36

Good Spreadsheet Design


Some suggestions:
Planning saves time and trouble: Before turning on the computer lay out a tentative structure of the model on paper. Document the worksheet: you should design your model so that six months from now you can remember the purpose of the template and how it works. Color-code input data: We will use blue-background. Might also color-code important outputs, or cells containing random functions.
37

Good Spreadsheet Design


Use an effective layout:
In general a good layout should be vertical rather than horizontal. Spreadsheet should begin with an identification (a descriptive title, authors name, date of creation). Separate areas of different use. Data section should be separate from the work area. Description of all constants, variable, assumptions should be written.

38

Good Spreadsheet Design


Pay attention to alignment and format:
Put labels over all columns. Use currency & comma formats where appropriate. Use an integer format where decimal accuracy is not needed. Arrange all worksheet data in either columns or rows, not a combination of both.

Each input data should be entered only once.


If for clarity purposes it is to be repeated, this should be done by using cell references or range names.
39

Good Spreadsheet Design


Write clear formulas: Divide complex calculations into several cells and write explanatory comments avoid too long formulas! Use sample data during development: It is quite difficult to create a blank spreadsheet with correct formulas and format.

40

Good Spreadsheet Design


Protect your worksheet from unintended changes:
Use Worksheet and Cell Protection options to prevent mistaken entry into or erasure of important cells.

41

You might also like