Skills Synopsis Finding your way round Excel; choosing your preferences Using Autofilter and exploring different filtering types Creating your own graph from scratch Using average, median and mode to determine graph scale Formatting the graph, axes, scale Formatting for printing, resizing, printing selection only Any other tips and tricks!
Click on Tools > Options Check the box to show the gridlines… …and check to display the row and column headers. Click OK when done. You might like to explore some of the other options You can now see the grid-lines and the column headers (A, B,C, etc.) and the row headers (1,2,3, etc) Let’s now move the graph to one side to see its data source. First of all, click on the graph until you see the eight black squares (called the handles) around the edges. Keep the left-mouse button down, and drag the chart to the right.
Here the graph has been moved to the right to show its data source. When creating graphs, you can opt to show them in the same worksheet, or put them into another worksheet on their own. It doesn’t matter because it still ‘knows’ where the data source is. You can see which data is included in the graph because it is shown in the table as selected (by a thin blue outline). Now click anywhere outside the graph and the table to deselect everything. We’re now ready to work with the data. That’s not a read code! What do you think has happened there? Something very important to bear in mind when using Excel is that what you see in the cell is not necessarily what is contained there! It all depends how the cell has been formatted. In this instance, the read code is actually 6600000. Because Excel has assumed this is a number, it has formatted it accordingly (using the exponential). TIP: If ever the contents of your cells look a bit strange, click on the cell, then look in the formula bar (the bit above the column header). The formula bar will display the true content of the cell (or will show a formula where one has been used). As read codes are never used in calculations, they should really be formatted as text. Let’s do that now…
Here we can see cell B15 selected… …and we can see its true value in the formula bar. Click on the column B header to select the whole column, as shown. Now click on Format > Cells Select ‘Text, then click OK’. The read codes are now all formatted correctly. Take a look at the other formats available, and always choose the one most appropriate to your needs for accurate results.
Let’s have a go at filtering the data. Click in cell B6, then holding down the SHIFT key, use the arrow keys to select the data range, ending in cell D26. Now click on Data > Filter > Auto filter. Black arrows will indicate drop-down lists, from which you can choose the filter criteria. Let’s filter on only those over 250. Click ‘Custom’… Select ‘is greater than or equal to’ from the drop-down list… …then type in 250 and click OK.
Your data is immediately filtered to show only those values over 250. You will see that your graph also alters to reflect this change. In Excel, graphs are dynamic in that they will change when your data changes, so there’s no need to create a new graph each time. Exercise: Now try filtering to show only values less than or equal to 250. Watch how your data changes and its associated graph. The graph will also change to a more appropriate scale. Once you’re done, go back into the Autofilter drop-down list and choose ‘All’ to show all your data again.
Let’s now create a graph from scratch. This will offer a good insight into how Excel displays the data graphically and formats it accordingly. Click on the graph to select it as you did before, then press the Delete button on your keyboard. It’s gone! Now select the data range as shown… …and click on the ‘Chart Wizard’ button. You can examine the different types of chart available, but for our purposes here we’ll use the Column chart, as shown. This button gives you a chance to see what your finished graph might look like. This ensures you’ve selected the most appropriate graph type. Click ‘Next’ when you’re ready.
Step 2 of the chart wizard shows you the data range that will be used in the graph. A flashing dotted line will also appear in your data table to show which data will be used. Click ‘Next’ to continue.
You can add a title, and name the X and Y axes, if you wish. We’ll leave it for now though. Excel is usually pretty good at formatting the axes. You can see the graph taking shape already. We’ll opt just to show the major gridlines, so the chart doesn’t look too cluttered. The ‘Show legend’ option will be ticked by default, but untick the box as we don’t need the legend this time. Tick the ‘Value’ box to show the data labels at the top of each column. Click ‘Next’ to continue.
You can choose whether to place the chart in a worksheet on its own, or to add it to the same worksheet. We’ll add it to its own worksheet for now – called Chart1 – the cut and paste it into this worksheet. This will save time formatting it all. Click ‘Finish’ when you’re done.
Here’s our finished graph, added to the ‘Chart1’ workbook. Click in the white area until the eight black handles appear… …then click the ‘Copy’ button on the toolbar. A black dotted line will show the chart is selected. Now go back to the original worksheet. Click the ‘Paste’button on the toolbar to paste the chart into the sheet. Here’s our chart, back in place again. You can simply delete the Chart1 worksheet now.
When dealing with lists of numbers in this – and any other – Excel worksheet, it can be useful sometimes to examine averages, especially when trying to determine the best scale for a graph. Three possible functions can be used: (a) AVERAGE – This determines the arithmetical mean, i.e. the total sum divided by the number of entries (b) MEDIAN – This produces a number which falls exactly in the middle of a range of numbers (c) MODE – This finds the number that appears most often in a list of numbers. Let’s examine each of these in turn. Click in cell D28 to select it, as shown. Now type in: =AVERAGE(D7:D26) and press Enter The answer, 540.5, appears in the cell as shown… …and the formula you used appears in the formula bar. Excel always knows you are using a function or formula when you start with an ‘equals’ (=) sign. Exercise: Now try using MEDIAN and MODE using exactly the same method. You should get the answers 265 and 171 respectively.
Now we’re going to practice formatting the graph. We’ll start with the scale. This is useful if you need to print a hard copy of the graph. Right-click on the number at the top of the scale, and choose ‘Format Axis’ Choose ‘Scale’. As we know the average is less than 600, 2000 as the maximum is unnecessarily high. We’ll therefore change this to 1000. Type 1000 in here… …and type 100 in here. Remove the tick from the minor unit box, as we don’t need to include this. Click ‘OK’ when done.
This shows the reformatted scale. As you can see, the four numbers over 1000 have ‘come off the scale’ but hovering your mouse pointer over them will tell you the amount. As we want to print the graph, however, we’ll need to add the data labels. Click on the ‘Text box’ button on the drawing toolbar. Now click at the top of the column, and type the amount, in this case 1857. Do the same for the other columns.
To print the graph, click in the white area to show the black handles (i.e. select the graph). Now click on the ‘Print preview’ button. In this instance, Excel has fit the graph nicely to the size of the paper, but this does not always happen! It’s useful to know how to resize and reposition the graph. Let’s have a look at some of the options available. Click on ‘Setup’. Landscape is usually the best option for graphs and charts, so select this one if not already selected. Ensure the paper size matches the paper in your printer. Now click the ‘Margins’ tab. You can adjust the page margins by typing the size in the boxes, or selecting the size from the drop- down lists. Another way is to click the ‘Margins’ button to display them in preview mode…
…then drag them into position. To drag the margins, hover your mouse pointer until it becomes a black cross, then drag in the direction of the arrow points on the cross. Now let’s add a header and footer. Click on the ‘Setup’ button again. Click ‘Header/Footer’. You can choose from a list of suggested headers... …or you can click ‘Custom Header’ and type in your own. In this example, I’ve chosen one from the drop- down list. It gives the name of the chart and the page number. Exercise: Click on ‘Custom Footer’ and add your own footer. Next, click the ‘Chart’ tab. This is where you can choose to use the whole page (as we’ve done in this example) or scale the chart to fit the page. You can also select a custom size for your chart. Click ‘OK’ when you’re done. Here’s our graph, complete with header and footer, ready for printing. Click ‘Print’ then follow the settings for your model of printer.
If you just want to print your data table, and not the graph, you can opt just to print the selection, rather than the whole worksheet. First of all, select the data table as shown. Now click on ‘Print Preview’. At this point it looks all wrong, because we haven’t yet specified what it is we want printing. We’ll do that now. Click ‘Print’ to display your printer options. Under ‘Print What’ choose ‘Selection’ Click ‘Preview’ to see what it looks like. You can now drag the margins to reposition the table on the page, and add a header and footer as you did before. Then click ‘Print’ and you’re done.