lecture 1: introduction · •practice! (computing/data analysis cannotbe learned effectively just...
TRANSCRIPT
Microsoft Office
Excel 2013
Material partly adapted from CCI Learning Solutions Inc.
MTH4114: Computing and Data Analysis with Excel
Lecture 1: Introduction
1
Microsoft Office
Excel 2013
• QMPlus page (check regularly for notes, announcements, etc.)https://qmplus.qmul.ac.uk/course/view.php?id=7457
• Lecturers (contact details and office hours at the above link)• Dr. Tomasz Popiel• Dr. Linus Wunderlich
• Classes (see your timetable for times/venues)• One lecture per week (1 hour)• One computer lab per week (2 hours)
• Assessment• Two homework assignments (5% each, available weeks 3 and 9)• Midterm test (20%, week 7): Microsoft certification exam• Final exam (70%, early January)
General information
2
Microsoft Office
Excel 2013
• What is the purpose of lectures?• Introduction/theory for the week’s material• Mixture of slides and Excel demos• Recorded (via “QReview”) for reference/revision
• What is the purpose of computer labs?• Practice! (Computing/data analysis cannot be learned effectively
just by listening to someone talk about it)• Exercise sheet to complete each week, based on lecture material
(submit answers to QMPlus for engagement monitoring)• Ask (unlimited) questions/receive immediate feedback from one of
your lecturers or teaching assistants
• How else can I get help?• Email your lecturers (see QMPlus for addresses)• Attend lecturers’ office hours (see QMPlus for details)
How do classes work?
3
Microsoft Office
Excel 2013
• Homework assignments (two, worth 5% each)• Released in weeks 3 and 9 via QMPlus• Due roughly one week later via QMPlus (upload Excel file)
• Midterm test (20%)• Week 7, in special computer lab times (to be announced)• Microsoft Office Specialist (MOS) Excel ‘Core’ certification exam
(free Microsoft certification to put on your CV)• Based on official Microsoft study guide (available on QMPlus), not
on lecture notes (these are similar but not the official syllabus)• Must register with Certiport (third-party exam administrator) and
GMetrix (software to practice the exam, e.g. in labs): see QMPlus
• Final exam (70%)• Early January (date to be announced)• Computer based, in Excel (past exams available on QMPlus)
How does assessment work?
4
Microsoft Office
Excel 2013 What is a spreadsheet?
5
Close File Quick Access Ribbon Title Maximize/Restore Tab Toolbar Bar Minimize
Name Box Insert Function Formula Bar Help Ribbon Column Display Headings Options
Active Cell
Row Headings
Tab Sheet Status Bar View Buttons Zoom Slider Scrolling Tab Buttons
Scroll Bars
• Looks like a piece of paper with ruled rows/columns
• Data (numbers, text, formulas) is entered into cells(intersection of row/column)
• Used to organisedata and perform calculations
• Excel also has graphics capabilities (charts, graphs etc.)
Microsoft Office
Excel 2013
• Starting Excel• Windows 10 and Excel 2016 are used in QMUL computer labs• Look for the Excel icon in start screen/all apps/quick launch:
• Creating a new Workbook• A “workbook” is an Excel file (file extenstion .xlsx) • Each workbook can contain many “worksheets” (spreadsheets);
you can add worksheets by pressing in the sheet tab• To create a workbook, click File then New, or type CTRL+N
• To switch between workbooks, go to the View tab in Excel and click on Switch Windows, or use the Windows task bar:
Getting started
6
Microsoft Office
Excel 2013
• How to save a workbook:• Click File then Save As to
save with a new file name (this brings up a dialog box like the one shown here)
• Click File then Save (or type CTRL+S) to save all changes to the current file
Saving your work
7
• Where to save your files:• Use the “G” drive on your lab PC• This is your ‘personal’ drive: your files will be there even if you use
a different computer next time you come to class• It is strongly recommended to create a folder G:\MTH4114 (or a
similar name), to keep all of your work organised in one place
Microsoft Office
Excel 2013
• Often you will need to open an existing workbook (e.g. one downloaded from QMPlus) instead of creating a new one. To do this:
• Click File then Open, or press CTRL+O, which brings up a dialog box (similar to the ‘save’ dialog box) where you can find your file
• There are also other methods to open files (e.g. ‘recent items’) which you can experiment with in labs if you like
• To close a workbook:• Click File then Close, or press CTRL+W• Click the icon to close all open workbooks• If you have unsaved work, you will be given a warning:
Opening and closing workbooks
8
Microsoft Office
Excel 2013
• Our most common task is entering data into single cell: • The cell’s address tells you which column/row it is in, e.g. “C5”
means “the cell in column C and row 5”• Clicking on a cell allows you enter data into that cell, either by
typing it directly or by using the formula bar
• Three types of data can be entered:• Text, e.g. “Name”, “Date”, “Price” (or whatever you like)• Numerical data, e.g. numbers (1, 23, 456.78), dates (13-Mar-08,
13/03/08), times (12:30 am, 0:30) • Formulas, always beginning with an = sign, which are used to
perform calculations using data in other cells, e.g.• =B3 (makes the cell equal to whatever is in cell B3)• =A1-C4 (makes the cell equal to whatever is in cell A1 minus
whatever is in cell C4)• =SUM(B3:B6) (makes the cell equal to the sum of the values
in cells B3, B4, B5 and B6)
Entering data into a single cell
9
Microsoft Office
Excel 2013
• When entering numbers:• A mixture of letters and numbers is treated as text
• When entering dates and times: • If entering a date using only numbers, format must be dd-mm-yy
or dd/mm/yy (by default, depending on Windows settings), e.g. 14-03-18 and 14/03/18 are interpreted as “14th of March, 2018”, but 03-14-18 and 03/14/18 are not
• Alternatively, use first three letters of month name, e.g. 05/Aug/18 and 05-Aug-18 both mean “5th of August, 2018”
• Can enter just day and month, or just month and year• Entering name of month only (e.g. “May”) is treated as text;
entering day or year only (e.g. “2” or “2019”) is treated as numbers• Time must contain hours and minutes in the format hh:mm, e.g.
12:45 • Seconds can be added (e.g. 12:45:59), as can am/pm indicator
(e.g. “12:30 pm”, including the space)
Entering numerical data
10
Microsoft Office
Excel 2013
• Many ways to enter a formula (also called a function) into a cell:• Type the formula into the cell directly• Select the cell and then type the formula into the formula bar• Select the cell and then use the formula builder by clicking• Click on the Formulas tab and use the various shortcuts
• There are many kinds of possible formulas, e.g.• Arithmetic operations, e.g. =3+10, =7-2; =5*3 (multiplication),
=18/6 (division), =10%, =4^2 (power/exponent), etc.• Mathematical functions, e.g. =SIN(0) (sine of 0), =COS(1) (cosine
of 1), =LN(3) (natural logarithm of 3), etc.• Statistical functions, e.g. AVERAGE (average), NORM.DIST
(cumulative normal distribution), etc.• Formulas for manipulating text, e.g. =LEFT(“abcdef”, 4) returns
the left-most 4 letters of the string “abcdef”• Date/time formulas, e.g. =TODAY() returns today’s date• Combinations of these, e.g. =(2+SIN(1))/(4-COS(0))
Entering formulas
11
Microsoft Office
Excel 2013
• Formulas usually reference other cells, e.g. if we want to sum 12 numbers (e.g. monthly profits) stored in cells A1 to A12, we could enter the formula =SUM(A1:A12) into cell A13 (to get yearly profit)
• When we copy a formula to another cell, we often want the referenced cells to change accordingly, e.g. if we copy =SUM(A1:A12) from A13 to B13, Excel assumes that we want to sum the cells B1 to B12, so the formula in B13 changes to =SUM(B1:B12)
• This is called relative referencing, i.e. Excel updates the reference when you copy it, based on the relative positions of rows/columns
• This can be very convenient, but sometimes we need to use absolute referencing instead, which is done using the $ sign:• $ before column, e.g. $A1 – column won’t change when copying• $ before row, e.g. A$1 – row won’t change when copying• Both, e.g. $A$1 – neither column nor row will change
Cell referencing
12
Microsoft Office
Excel 2013
• The format of a cell refers to how the cell and the data in it appear (as opposed to the data/value in the cell)
Formatting cells
13
• Formatting options include:• Font (typeface, size, bold/italic,
colour, etc.)• Number type (e.g. currency,
scientific notation, etc.)• Alignment (defaults: left of cell
for text, right of cell for numbers)• Cell border/background colour
• To bring up the ‘format cells’ dialog box, click Format then Cells
• When copy/pasting the contents of a cell, formatting is also copied; when deleting the contents of a cell, formatting is not deleted
Microsoft Office
Excel 2013
• Excel provides lots of functionality for working efficiently, e.g.• Keyboard and/or mouse shortcuts for common tasks• Time-saving features, e.g. relative referencing, AutoFill
• We cannot possibly list all of these here, but we mention some of them and remind you that you need to practice to become efficient
• A basic example is the quick access toolbar (top-left of the Excel window), which contains buttons for frequently used commands (e.g. Save) and can be customised
Knowing your way around
14
Excel Control Icon Undo Redo
Save Customize Quick Access Toolbar
Microsoft Office
Excel 2013
• The ribbon is the rectangular display at the top of the Excel window:
• It collects related commands into tabs, e.g. the Insert tab (for adding charts/tables), the Formulas tab (for creating formulas), etc.
• Each tab has several groups, which further help to collect related commands together, e.g. the Home tab has the Font group, Alignment group, and other groups containing basic formatting commands
• Some tabs are contextual, meaning they only appear when applicable, e.g. Format tabs appears when you insert an object
The ribbon
15
Microsoft Office
Excel 2013
• Format tabs have quick style boxes for changing the overall appearance of the inserted object, e.g.
• Clicking the `more’ button displays a full list of available styles:
The ribbon (continued)
16
Microsoft Office
Excel 2013
• Each group’s dialog box launcher (down arrow in the bottom-right corner of the group) brings up the corresponding dialog box:
• Note also: if you prefer to use the keyboard, ALT or F10 displays keyboard shortcuts:
The ribbon (continued)
17
Microsoft Office
Excel 2013
• When working with an Excel spreadsheet, the mouse cursor changes depending on where you place it, indicating available functionality:
• (Note that some of these things can also be done with the keyboard, e.g. arrow keys to move from cell to cell)
Using the mouse
18
Microsoft Office
Excel 2013
• So far we have considered selecting and entering data into a single cell, but often we need to select a range of cells to edit together
• Importantly, AutoFill can automatically complete ‘sequences’ of data, e.g. to enter the 31 days of January into cells A1 to A31, you can just• Type 01-Jan into cell A1 and 02-Jan into cell A2• Use the mouse to select A1 and A2 together• Drag the cursor from the bottom-right corner of A2 to A31Excel will try to guess what you mean when you try to use AutoFill, and you can use the AutoFill icon to select options
• Similarly, Flash-fill can automatically fill in data by noticing patterns, e.g. if you have a list of forenames in column A and surnames in column B, you can easily create a list of full names in column C:• Type the first full name in column C1• Select column C2 and click the Flash-fill button in the Data tab• (In fact, Excel will often automatically show you a preview of the
filled-in data, and you can just press Enter to confirm)
Working with ranges of cells
19
Microsoft Office
Excel 2013
• Another common reason to select a range of cells together is for formatting, e.g. put a border around a range of cells, change the background colour of a range of cells, change the font, etc.
• The following table summarises how to select various ranges of cells:
• Note: cells stay selected until you change or remove the selection (by e.g. clicking on any cell or pressing any arrow key)
Working with ranges of cells (continued)
20
Selection/action How to do it
Single cell Click cell
Entire row/column Click row/column heading
Entire worksheet Click Edit then Select All
Select range of cells using mouse Click beginning cell, hold CTRL, click ending cell
Extend/shrink selection Hold CTRL and press new ending cell
Extend entire row/column selection Click row/column heading and drag
Add non-adjacent range to selection Hold CTRL and use mouse to select new range
Microsoft Office
Excel 2013
For example, to select the following ranges of cells together, you could1. Click B4 and drag the mouse to B72. Hold CTRL, click D2 and drag to F33. Hold CTRL again, click D11 and drag to E18
Working with ranges of cells (continued)
21
Microsoft Office
Excel 2013
We finish Lecture 1 by mentioning a few advanced topics that you may need to be aware of from time to time:
• If your formulas contain circular references (e.g. if you enter =D10 in cell D9 and =D9 in cell D10) you will see a warning like this one at the bottom of the screen:
• Sometimes it is useful to restrict the type of data that can be entered into certain cells; this can be done as follows:• Select the relevant range of cells• Click on the Data Validation button in the Data tab• A dialog box will open, in which you can
• Indicate which type of input data to accept• Provide a message to warn the user of the input restrictions• Provide an error message to display if invalid data is entered
Some advanced topics
22
Microsoft Office
Excel 2013
• Excel can open some different file types in addition to the usual Workbooks (extension .xlsx)
• Importantly, CSV (“comma separated values”) files are commonly used to import data – you can think of these like very basic spreadsheets which only store data, but no formatting or formulas, so Excel warns you about saving files in .csv format after editing them, in case you’ve added features that would be lost
• Compatibility mode allows you to work with files from old versions of Excel• If you open a file created in an old version of Excel, the title bar
displays the text “[Compatibility Mode]” next to the file name; Excel features that were not included in the version in which the file was created are disabled
• If you are creating a file and want to check whether it will work with older versions of Excel, you can click the File tab then click Info, Check for Issues, Check Compatibility
Some advanced topics (continued)
23