Você está na página 1de 24

Excel Level 2

Introduction The aim of this document is to introduce some techniques for manipulating data within Excel, including sorting, filtering and how to customise the charts you create. Prerequisites The exercises below assume that you are familiar with the use of a computer keyboard and mouse and have some knowledge of the basic techniques used in Excel, or have completed document 5.166, Excel 2007 A Beginners Guide.

Contents 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. Download a workbook Calculations Customising a Chart Setting up a new sheet Cross-sheet calculations Sorting data Filtering data Absolute References Naming cells Freezing and hiding parts of the screen Conditional Formatting 3 4 6 9 12 14 16 19 20 22 24
Will need to be typed or chosen from a menu or window Indicate keys that you press Press both keys together Press each key consecutively Are guidelines on how to perform a task Show menu commands in this case, choose the option Picture from the Insert menu at the top of the screen

About this Document Words in bold Small capitals e.g. ALT Press KEY1 + KEY2 Press KEY1, KEY2 Bulleted lists Choose Insert - Picture

Excel Level 2

This document is available from the ITS help desk, Malet Street or from the College intranet at www.bbk.ac.uk/its/docs/. Large print copies are available on request

Birkbeck College IT Services

Excel Level 2

1 Download a workbook
Objectives Download a spreadsheet for use in the exercises that follow Method Use Internet Explorer to save the file from the ITS website Comments Right-clicking on a link brings up different options 1.1 Internet Explorer We will use Internet Explorer to download a spreadsheet to save typing it from scratch Open Internet Explorer Browse to http://www.bbk.ac.uk/its/help/training/course_material/excel10.xls (or http://bit.ly/epxRFQ for short) Save the spreadsheet into your My Documents folder Open Excel Open the spreadsheet you have just saved

Birkbeck College IT Services

Excel Level 2

2 Calculations
Objectives To perform a simple calculation in Excel Method Use Insert function to set up the calculation Comments In the level 1 workshop we used the autosum command. Insert function gives access to the full range of Excel commands. 2.1 Insert Function The insert function icon gives easy access to Excels many types of calculation. Use the Marks 09-10 worksheet. Click into cell M4 Position the mouse over the fx sign next to the Name box the popup help tells you it is called Insert function Click on that icon Figure 2-1 A new window pops up. First we have to tell excel which calculation we want to carry out From the list, select the word COUNT and click OK If COUNT is not visible, type COUNT in the top box and click Go

Figure 2-2 The popup window changes appearance. Excel will guess which values you want to work with, and should have filled in I4:L4 (note how Excel uses : to mean to). We want to count the cells containing marks, so that this cell acts as a quick check that all marks are in place. Click and drag to select from the cells from C4 to G4 Click OK

Excel has now filled in the full function

Birkbeck College IT Services

Excel Level 2

2.2

Repeat for M5

Repeated Formulae Although we have done so here, it is not necessary to use Insert function for each value. Excel is clever enough to understand that if you copy and paste a Sum from one column, you want to work with the values in the new column. Click on M5 Choose Edit Copy (or CTRL+C) Click on M6 (which is blank at present) Choose Edit Paste (or CTRL+V)

Figure 2-3 Note as at the top right of Figure 2-3 that when you pasted in the formula, Excel changed it from C5:G5 to C6:G6 2.3 The drag handle The drag handle the box at the bottom right of the active cell can be used to repeat values across several cells. It also works for formulae Click on cell M6 and then on the drag handle Drag it down until all rows have their COUNT

Have a look at the syntax of an Excel formula; note the = sign at the beginning, then the function to be performed, and finally, in brackets, the cells containing the values on which to perform it. The list of functions is fairly comprehensive have a look down and see if there are any others that might be of use to you.

Birkbeck College IT Services

Excel Level 2

3 Customising a Chart
Objectives To change a charts appearance Method Use the Chart Tools Ribbon to change a charts appearance Comments Excel charts are extremely customisable use the Ribbon or right-click to change the colour, font, size or even remove a particular series or label. 3.1 Font size The font sizes chosen by Excel may be a little too small relative to the size of the pie chart. Changing them is similar but slightly different to Word, in that you do not select the text in the same way Click on the tab for Student 1 at the bottom of the workbook Click on the heading, Student 1 Use the Home Ribbon to change the font to a larger size Repeat for the legend at the side of the chart

Note that you could instead have right-clicked on the text and chosen Format Chart Title or Format Legend, as appropriate 3.2 Data series options There are different options for each area of the chart. Double click on the pie-chart itself

Doing so brings up the Data Series Ribbon at the top of the screen. Experiment with the Chart Styles offered the icon at bottom right, as shown, displays more options. On the Chart Tools Layout Ribbon, click on the Data Labels icon Select an option from the list

The corresponding figures are displayed on the chart. More options are available. Click the icon again and choose More Data Label Options Tick the boxes to show Value and Percentage, as in Figure 3-1

We dont now need the legend, so it can be removed. Click on the Legend Press the DELETE key Figure 3-1 If you wanted to include the text from the legend on the chart, tick Category Name within the Data Label Options. 6 Birkbeck College IT Services

Excel Level 2

3.3

3.4

Group vs Individual selection

Some areas of the chart are made up of several different items the legend and data labels are made up of different pieces of text, the pie chart of different slices Excel allows you to select items as a group or individually. Click on the pie chart itself

That single click has selected the whole of the chart area that is, all of the slices as a group. Selecting individual slices is a little fiddly. Click again on one of the slices, in a different place to your first click

You should now have selected just one slice of the pie chart the white circles marking the current selection should be around the edge of the slice. Click on a different slice

Note that, now Excel has switched to allowing you to select one slice, each time you click it selects a different individual piece. Click on the Chart Tools Format Ribbon

Figure 3-2 Use the Shape Fill icon to change the colour Change the colour of a different slice in the same way Try dragging to move a slice in or out of the pie chart

Using the techniques above, it is possible to customise the appearance of your chart and give prominence to different information as necessary It is easy to get stuck selecting just individual areas of a chart. To exit this mode of selection, either click somewhere neutral (e.g. on the background) on the chart, or press the ESCAPE key. This technique is also effective in allowing you to select individual labels for example, if a category had 0% you could select its label and then use the keyboard to delete it. Birkbeck College IT Services 7

Excel Level 2

Birkbeck College IT Services

Excel Level 2

4 Setting up a new sheet


Objectives Method Set up a new worksheet We will use and rename one of the worksheets already within the workbook and add columns Renaming the worksheets Rename sheet2 which is currently blank to Summary 4.2 Double click on the tab for Sheet2 at the bottom of the screen the text should be highlighted in black Type in the new name Hit RETURN

4.1

Summary Sheet Click on the tab to take you to the Summary worksheet In the top-left cell, A1, enter Summary Next to it, in B1, enter Highest Mark Next to that, in C1, enter Lowest Mark Resize those columns as necessary Click on the tab to return to the Marks 09-10 worksheet Select the headings from Exam to Class particip, as in Figure 4-1 Click on the copy icon (CTRL + C is the shortcut) Click on the tab to change to the Summary worksheet

Figure 4-1 Click into the first blank cell on the first column, which should be A2 From the Home Ribbon, click on the lower half of the Paste icon and choose Paste Special You need not worry about any of the options that pop up, except the last tick the box marked Transpose, as in Figure 4-2 Click OK

The headings will be pasted into the column (Note that the most common paste special options, including transpose are available directly from the paste special icon)

Birkbeck College IT Services

Excel Level 2

Figure 4-2 4.3 Entering Information We now have a very basic spreadsheet for recording summary information, by coursework, from the previous sheet. We will add date information for each assessment Insert a column to the right of the first column (Summary sheet) In the new, blank, cell B1, type date Beneath, in cell b2, type 25/5

If you click back onto the field, you will see at the top that Excel has assumed the year is the current one, as in Figure 4-3

Figure 4-3 4.4 Enter some more dates at random to fill the next few cells of that column Excel understands very abbreviated dates for 11th November 2009, you may enter 11/11/9

Date Format Knowing we are entering dates, Excel has tried to apply a format to them. It is not always consistent in doing so and, in any case, may not be the format you prefer. Excel allows you to use several different formats, without changing the information held in each cell. Click on the column header, B, to select the whole column On the Home Ribbon Update the date formats so they are all the same use the Number group on the Home Ribbon, then either the drop-down menu for standard or the to access custom formats.

10

Birkbeck College IT Services

Excel Level 2

On the Home Ribbon, use the Number group then either the drop-down menu for standard or the to access custom formats. Choose Date on the left-hand side Pick a format on the right Click OK

Figure 4-4 Because the whole column was selected, that format will now apply to all dates entered, no matter how many rows are used.

Birkbeck College IT Services

11

Excel Level 2

5 Cross-sheet calculations
Objectives To use the details within the sheet containing Marks to supply data on the summary sheet Method Type the calculation; switch sheets using the tab Comments You may use the autosum or Insert Function if you prefer 5.1 Cross-sheet calculations Now that we have a skeleton summary sheet, we should add formulas that incorporate the original data. Excel will allow you to enter a calculation on one sheet which relies on values on a different sheet. Click on the tab to return to the Summary sheet, if necessary

We will use the MAX and MIN functions Click into the first Highest Mark cell, C2 Type =MAX( Click on the tab called Marks 09-10 to move to the list of marks Select all the marks cells C4:C142 Press RETURN

Figure 5-1 You will be returned to the overall sheet, with the total filled in. Any relevant changes or additions you make to the marks on the sheet Marks 09-10 will be reflected on the summary sheet. Click into cell D2 on the summary sheet Type =MIN( Click on the tab called Marks 09-10 to move to the list of marks Select all the marks cells C4:C142 Press RETURN Repeat the formula to calculate the highest and lowest marks for the other assignments. You cannot use the drag handle, unfortunately

This technique also works to allow you to carry out calculations across different workbooks, though you will need to open the workbook in advance of entering the formula. If you have a formula that relies on another workbook, make sure you update that formula if you change the name or location of the file.

12

Birkbeck College IT Services

Excel Level 2

5.2

Removing error marks Excel will probably have put a green arrow in the corner of your calculations. It has spotted that we have ignored row 3 in the preceding table that is because it contains percentages for the weighted average, and so isnt a mark. Excel gives us the error Formula Omits Adjacent Cells, as below.

The Ignore Error command is also shown above, but you can remove it from several cells at once, rather than each individually. Select cells C2:D6 (all the Highest-Lowest mark formulas) Click the ! icon shown Choose Ignore Error

Birkbeck College IT Services

13

Excel Level 2

6 Sorting data
Objectives Method 6.1 To sort data in columns Use sort function to specify which columns to sort by, and in which order Selecting data Sorting information entered into an Excel spreadsheet is straightforward. You may sort data by using the Sort and Filter command on the Home or Data Ribbons. Using the Custom Sort command on the Home Ribbon or the Sort button on the Data Ribbon allows you to sort by more than one field. Click on the Summary tab to move to that worksheet Click on a cell containing a date On the Home Ribbon click Sort & Filter and choose Sort Oldest to Newest

Excel should assume that the top row are headings but depending on how your data is formatted it may not always do so. To control the sort function more closely, or sort by more than one column, use the Custom Sort function (also available on the Data Ribbon, click on Sort). Click on Sort & Filter and choose Custom Sort

Excel will bring up the sort dialogue box. Note that Excel will try to select all the relevant data but if there are gaps it may only select a selection. If the dialogue box looks like Figure 6-1, with the column headings not shown in the list, click cancel and try selecting cell A2 and choosing Custom Sort again Excel should then select all of the data and see that there is a header row.

14

Birkbeck College IT Services

Excel Level 2 Figure 6-1

6.2

Column headings Once Excel has spotted the range of data, it should see that the top row is a header though note the options at the bottom to tell it explicitly. Use the drop-down to pick a column to sort by Click Add Level Choose a second column to sort by Click OK

Figure 6-2 Information may be reordered using Excels in-built sort function whether it is numerical or textual.

Birkbeck College IT Services

15

Excel Level 2

7 Filtering data
Objectives Add a filter to a column of data in order to change the information displayed Method Use the Filter command to add drop down lists to each heading Comments The filter is particularly useful where you have repeated info in a column 7.1 Filter Excel allows you to filter the information displayed on screen very useful when you have long lists of data with repeated information. The filter function finds all the values in a column and adds them to a drop-down menu. In our spreadsheet, we can use it to filter expenditure by date. Click on the tab for the Applicants sheet Choose Sort & Filter Filter Figure 7-1 Excel adds a drop-down list to the top of each heading, as in Figure 7-1 Click on the drop-down menu by the First contact header

As in Figure 7-2, the list of dates entered on the spreadsheet appears any date not entered does not appear. Click on the tick box next to 2010 to de-select all dates Select just one date from the list Click OK

Figure 7-2 Only entries for that date will be shown To show all data again you could tick the box at the top, but it is easier to click on the Filter command again (or the Filter icon on the Data Ribbon). That will remove the drop-down menus and show all the data. 7.2 Custom filter You are not restricted to showing only one item from the list tick more than one option in the list to see several. For more complex filtering, use the option above the tick boxes, which changes according to the contents of the cells;

16

Birkbeck College IT Services

Excel Level 2

Figure 7-3 You may apply various different combinations here. With textual information, you might choose to show all information except one value, with the does not equal option. The does not begin with and does not end with options may also be useful. Use the filter on the Date column, click on Date Filters and choose after Select a date using the right-hand drop-down menu, as in Figure 7-4 Click OK

Excel will show all information relating to dates greater than the one you picked. The custom filter may be used for both text and numbers. Figure 7-4

7.3

Switching off the filter To switch off the filter, select the option from the Home or Data Ribbon once more On the Home Ribbon Click the Sort & Filter icon Choose Filter

On the Data Ribbon Birkbeck College IT Services 17

Excel Level 2 Click the Filter icon

The drop down menus disappear, and all the data is displayed.

18

Birkbeck College IT Services

Excel Level 2

8 Absolute References
Objectives Method 8.1 To perform a calculation based a constant entered in one cell allowing for the easy incorporation of future changes in % weighting Use an absolute reference to the cell containing the % weight

Absolute vs relative We have already seen Excels use of relative references when copying a formula (e.g.) from row b to row c, that formula is updated to perform calculations on the new row, not the old one. It is sometimes, however, useful to set an absolute reference, rather than a relative one; if calculating based on a constant number to apply a percentage increase, for instance.

8.2

Setting the % weight Click on the tab to switch to the Marks 09-10 sheet

There are 5 pieces of coursework already on this sheet. We will start by only including the first two in a calculation, with one worth 70% and the other 30%. To use an absolute reference, we need to enter the percentages in their own cells Click into cell O3 Type 70% Next to it, in cell P3, type 30% In cell O4 type =C4*O3+D4*P3

That formula gives us the weighted average for the first student, but the cell references are still relative. We need to make the references to O3 and P3 absolute references so that when the formula is copied down the column they do not become O4, O5 and so on, but always point to the same cell. Click into cell O3 Press F2 The cursor should be next to the text P3 press F4 to make that an absolute reference Use the arrow keys to move the text next to the text O3 and press F4 Copy the calculation all the way down the column Try changing the percentages to check the weighted mark changes

Birkbeck College IT Services

19

Excel Level 2

9 Naming cells
Objectives To give the cells for coursework 4 and 5 a distinctive name Method Use Excels Name box to rename a cell Comments Naming a cell or range of cells allows you to refer to it by name rather than cell reference. Doing so is possibly of more use if you plan to type your formulae, but is invaluable if using lookup tables with the VLOOKUP function. 9.1 The Name Box The name box is to the left of the function wizard we used before, showing the reference of the active cell, Figure 9-1 have as in

Figure 9-1 The worksheet Marks 09-10 has weighted percentages for each piece of coursework. The first three have been named, but Essay 3 and Class Particip do not have names. Click on cell F3 Click into the name box Type the text, coursework4 Press RETURN to confirm

That cell has now been called coursework4. You may still refer to it as F3, but may also use the name just defined. Repeat the steps above for cell G3, naming it coursework5

9.2 Entering a formula by hand Each name can only be used once, so any name is always an absolute reference, with no need for $ signs around it. We can now enter a calculation to use the weighted mark for all 5 pieces of coursework. We will just enter a calculation for the first assessment to start with. Click into cell K4, which will hold the weighted average for student 1 Type = Click on cell C4, type * and then click on cell C3 Press RETURN

That cell should now hold the formula =C4*coursework1 Which calculates 30% of the exam mark and puts it into K4. You should now be able to 20 Birkbeck College IT Services

Excel Level 2 complete the calculation, either by a mixture of clicking and typing or just by typing. The finished example should be
=C4*coursework1+D4*coursework2+E4*coursework3+F4*coursework4+G4*coursework5

That may then be copied down the column. Note that you could put brackets around each portion of the calculation if it makes it clearer;
=(C4*coursework1)+(D4*coursework2)+(E4*coursework3)+(F4*coursework4)+(G4*coursewor k5)

Birkbeck College IT Services

21

Excel Level 2

10 Freezing and hiding parts of the screen


Objectives Method 10.1 Fix part of the screen in place so it is always visible when scrolling Click into the spreadsheet and use the Freeze panes command Freeze panes It is often useful to be able to keep part of your spreadsheet visible; keeping the header row in sight as you scroll down, for instance. Click on the tab to change to the Applicants worksheet On the View Ribbon, click on Freeze Panes and choose Freeze Top Row

A thin black line has appeared across the top of row 2 you may not be able to see it if there is a border there already

The first option may also be used in the same way, or to freeze columns and rows together (note that rows are only frozen when scrolling vertically, columns only when scrolling horizontally). To freeze both columns and rows you need to click into a cell below that to be frozen (for rows) and to the right (for columns) of the data you want to keep in view. Click on the tab for Marks 09-10 to change to that worksheet Click into cell A4 Choose Freeze panes Freeze Panes Scroll down the spreadsheet

The Split command, also on the View Ribbon, has a similar effect, but allows you to keep parts of the worksheet on screen at all times. That has the advantage of allowing you to click and drag the split lines around the worksheet, to enlarge the area shown within each panel.

22

Birkbeck College IT Services

Excel Level 2

10.2

Hide columns To hide a column, right click on its heading (the letter at the top) and choose Hide, or click and drag the right-hand edge of the heading left until it disappears. It is possible to unhide a column with careful clicking click and drag the heading of the last visible column to the left of the hidden one. On the Marks 09-10 worksheet, where columns H and I are hidden, position the mouse on the right of the heading for column G. Move the mouse slightly to the right and you should see the cursor change click and drag and column H will appear. It is easier to select the columns either side of the hidden one, right-click and choose Unhide. Change to the Marks 09-10 worksheet Select columns G and J Right click and choose unhide

Sheets can also be hidden right-click on the sheet and choose Hide similarly.

Birkbeck College IT Services

23

Excel Level 2

11 Conditional Formatting
Objectives Method 11.1 Format data differently when a condition is met Use the conditional formatting command on the Home Ribbon Conditional Formatting We will use conditional formatting to make it more obvious when there are not 5 marks for different assignments on the Marks 09-10 sheet. Click on the heading M to select the whole column Click on the Conditional Formatting command, as shown Select Less Than

If there are 5 marks, all is well, so we are looking for a count of less than 5 Type 5 into the box, and select a format to apply, such as Red Text (shown below)

Explore other options available using Conditional Formatting.

24

Birkbeck College IT Services

Você também pode gostar