Microsoft Excel for Biologists

file: d:\b173-2015\basic_spreadsheet_excel.wpd

date: August 31, 2015

Introduction

Microsoft Excel is a "spreadsheet" program. The idea of a spreadsheet program is that it acts like a large pad of paper on which you typically enter numbers and then do operations on those numbers, such as calculating averages. Excel can actually do a whole lot more but we will focus on its numerical and graphical abilities.

Excel is not the only spreadsheet out there. Others you might encounter include Lotus 1-2-3 and Quattro Pro, but Excel is more widespread in the workplace at this time. (All of these derive from a much older spreadsheet called Visicalc by the way). All spreadsheets work roughly the same way though they differ slightly in syntax.

We will make use of Excel in this course for recording and organizing data, data analysis and data presentation (graphs). This is useful not only for this course but any job in any scientific field requires you to be skilled at Excel. Learn it and become proficient with it.

Excel 2013

For this course, we will be using Excel 2013. This version is radically different than earlier versions such as Excel 2003, though it is somewhat similar to Excel 2010. This is also the version available on the laptops and in the CSUS computer labs. Some of you may have your own MAC computers. You are free to use them, HOWEVER, you will be tested using the PC version of Excel so I strongly suggest that you use that version as well – they work slightly differently.

Important Note

Sometimes there are multiple ways of doing things when using Excel. I will teach you one way; you are welcome to explore other ways. If you choose to do something in a different way than I show you, you are responsible for the way I show you as well as any other method you might use. In some cases, the different approaches lead to the same result, but in other cases they do not. This is particularly important when utilizing some of the "short-cuts" and "effort savers" built into Excel. For example, Microsoft chose to build in a "Trend" feature. This feature calculates trend lines through data. You are welcome to explore this feature, but be warned: in some cases, it will not give you the correct answer, i.e., the answer that it gives you is not the answer that you think it should be giving you.

The most important thing when using any piece of software is to make sure that the program is doing what you want it to do; never say "that is just what the program did" – that tells me that you do not know what is going on. A scientist cannot operate that way when dealing with data. Ever!

Today's Goal

Some of you already know how to use Excel, for others it is entirely new. The goal of today's lab is to get everyone up to speed.

The Basics

The key thing to understand when using a spreadsheet is that everything is relative. Here is what that statement means...

A spreadsheet consists of a two-dimensional grid. The rows are labelled with numbers starting at 1 as the first row. The columns are labelled with letters (A, B, C... Z, AA, AB...). Modern spreadsheets can be larger than you will ever need.

Into each cell you may enter either a number, a bit of text, or a formula.

You then refer to these items by their coordinates. So for instance if you enter the number 2 in the top-left cell, you can refer to this value by the notation A1. If you enter a value of 10 below that, then you can refer to that value as A2.

At first this seems like more trouble than it is worth, but it will prove itself useful as things get more complex.

Let's say you want to add these two values, the computer can do this for you. I will use the following abbreviation to indicate what you should type:

A11:+A1+A2

means you should type +A1+A2 in cell A11.

So, do the following

A1:2

A2:10

A4:+A1+A2

What do you see? You should see the number 12 in cell A4.

Left-click on cell A4. Notice that although the number "12" appears in the cell at A4, in the edit line near the top of the spreadsheet, next to the little "fx" you still see "=+A1+A2". This is key because it tells you that the spreadsheet keeps track of the formula, not just the result.

Now change the value in A1 to a "1". What happens? Notice that the value of "1" appears in A1, but at the same time, the value in A4 changes to "11". This is the first important function of a spreadsheet -- the formulas stay the same and when you change a value, the answers are automatically recalculated. This can be very handy when dealing with large volumes of numbers.

Spreadsheets can do all sorts of mathematical operations

Adding up two numbers is hardly a revolution, and yet, it was the spreadsheet moreso than any other application which brought on the age of microcomputers. Why? Imagine you are a tax accountant faced with thousands and thousands of complex numbers and you find out that one of the most basic numbers you are using, e.g., the rate of sales tax, is about to change. The spreadsheet was the answer for these people.

Go back to your spreadsheet and left-click on the cell A2.

Now go to the Home tab, select Insert, then Insert Sheet Rows. Do this many times until you have 8 empty rows between the "1" and the "10", i.e., the "10" appears in cell A10.

Stop and look for a second at the formula where the "11" resides (cell A12). Notice that it no longer says "=+A1+A2". Rather it says "=+A1+A10". Why?

When you inserted the rows, the spreadsheet adjusted the formula to retain the logical relationships you had established.

Now fill in values in the cells A2 through A9. Use the numbers 2 through 9 in order.

Let's say you want to add all those values between A1 and A10, not just the first and last.

Go to cell A13. Select the Formulas tab, then go to Math&Trig, scroll down to SUM and click.

A box will pop up. The top line will be Number 1. There is a blank space to the right of this, and at the far right of that is a miniature Spreadsheet icon. Click on the miniature spreadsheet icon. You are now back at the spreadsheet, but in selection mode. Click and hold on A1 and drag down to A10, then release the mouse. Hit Enter, then click on OK.

Notice that the sum of the numbers you entered now appears in A13. It should say "55".

Everything is relative!

Enter another column of numbers in cells B1 through B10. Use the numbers "11" through "20".

You want to add these up. You could just insert the SUM formula again, but the golden rule of using spreadsheets is that having done something correctly once, copy it, rather than doing it again. This not only saves you time, but it also reduces mistakes.

So, go to cell A13. Hit Control-C (the usual Windows Copy command). Then move one to the right to cell B13. Hit Control-V (the usual Windows Paste command).

Notice that cell B13 now contains the sum of the values in column B (namely "155"). Why?

This works because spreadsheets are relative. Pay attention here. When you type SUM(A1:A10) in cell A13, that isn't actually what the program stores. What it really stores is the following: sum up the numbers which fall in the range starting 13 cells above this cell, down to 3 cells above this cell. So, when you copy that formula one cell to the right, it correctly sums up the numbers 13 cells above that cell down to 3 cells above that cell. This is extraordinarily useful.

Another way of copying is to grab the little box in the lower right of a cell and drag it to where you want the forumula copied to. Delete the previous contents of B13 and try this method of copying.

Adding Text

Spreadsheets can also contain text besides numbers and formulas.

Go to cell A1 and Insert five blank rows.

In cell A1, type your name. Make it bold and size 20. Select a cursive font (somthing that looks like handwriting).

In cell A2, type "Basic Spreadsheet Skills Using Excel"

In cell A3, type "File:"

In cell B3, type "Basic_Spreadsheet_Excel.xlsx"

In cell A4, type "Date:"

In cell B4, type today's date, i.e., "31 August 2015"

It is generally an excellent practice to always record right at the top of any spreadsheet such vital information as who made it, when it was last worked on, and what the file is named.

Also notice that you will need to change the format of cell B4 to text, rather than date format. Be aware that it is incorrect in science to report dates as 6/3/13, because this is ambiguous. Also be aware that the date format used above, i.e., 6/3/13 is used ONLY in the United States and very few other countries. In the rest of the world, that would mean something very different. You are much better to spell out the date unambiguously, i.e., June 3, 2013. Even more correct is this format: 3 June 2013.

Adding a Shape

Using the Insert tab, insert a shape into your spreadsheet. A large left pointing arrow is a nice choice. Position it near your summations.

Adding a Text Box

Again using the Insert tab, insert a text box near the arrow.

Going Overboard

Recent versions of Excel allow you to really go overboard. Insert a WordArt object with the word "Done" rotated at an angle.

Hand it in!

Print out this spreadsheet and hand it in. If you don't already, you will find it useful to carry a jump drive with you so that you can save your data and work for the future. -

- END