Building a Simple Web Page

We will build a simple web page so that you may place it on your geocities site. Recall the basic things we can place on a page.

The Spreadsheet


What is a spreadsheet?

      Spreadsheet is a generic term that is the computerized equivalent of an accounting ledger.

  • A spreadsheet is composed of a rectangular matrix (grid) of columns and rows.

  • A useful feature of a spreadsheet is that it provides us with the ability to make changes and have software carry out recalculations faster and more accurately than we can by hand.

    Microsoft Excel


  • The spreadsheet which we will use in this program is Microsoft Excel 97. It is part of the Office 97 package from Microsoft.

    Parts of the Microsoft Excel window


  • There are several important parts of the Microsoft Excel window.
    1. Title bar containing the Excel Icon, the Workbook name, the minimize, maximize/restore, and close buttons.

    2. Menu Bar.



    3. Standard Toolbar.



    4. Formatting Toolbar.



    5. Name Box.



    6. Formula Bar.



    7. Cells Area.

    8. Horizontal Scroll bar.

    9. Status bar.

    Some basic definitions


  • Columns in an Excel file are vertical collections of data and are labeled by letters. A Microsoft Excel spreadsheet file can contain columns labeled from A to IV.

  • Rows in an Excel file are horizontal collections of data and are labeled by numbers. A Microsoft Excel spreadsheet file can contain rows labeled from 1 to 16,384.

  • A cell is the intersection of a row and a column in a spreadsheet. Whenever we speak of a cell we identify it by first its column letter and then its row number. For example, the first cell in a Microsoft Excel spreadsheet file is cell A1.

  • Microsoft Excel allows us to store multiple sheets in the same file. Each individual sheet is called a Worksheet. The collection of the sheets is called a Workbook.


    Inputting data into our spreadsheet


  • When we place data into our spreadsheet file we must first select in which cell we will place the data. The data we type will be placed in the active cell. The active cell is indicated by a heavy border. In the following image, the active cell is C8.



  • There are three different types of data that can be placed into a cell.
    1. Values such as actual numbers.



      Notice that when the active cell has values in it, the Name Box contains the name of the active cell, and the Formula Bar contains the contents of the cell.

    2. Labels which are called constants.



    3. Formulas which begin with the = sign.

      The ability to have the contents of a cell be based on a formula is one of the reasons that spreadsheets are so powerful. There are many different ways we can use formulas. One of the most straightforward ways is to place a formula in a cell which contains arithmetic combinations of the data in other cells in the spreadsheet.

      As an example of this, suppose we have a list of numbers in one column and we wish to perform some arithmetic operation on these numbers and place the results in the second column.



      When the active cell is B1 type the following =sqrt(A1).

  • This a built-in function to find the square root of a number. We will talk later about built-in functions.

    You may also use simple arithmetic. That is you may use the standard arithmetic operators, + (addition), - (subtraction), * (multiplication), / (division), ^ (exponentiation), and paretheses.

    The hierarchy of these operations is as follows.

    Parentheses

    Exponentiation

    Division and Multiplication

    Addition and Subtraction

    To understand this hierarchy you may try the following exercises and check your answer with Microsoft Excel.
    1. 1-3*2^5-3^2*4

    2. 2+7*4/3+2-1*4+3

    3. 3^2*4/5+3*2

    4. 3^2^2

    Arithmetic Operations with existing data


    We can also perform arithmetic operations on data that exists in our spreadsheet.

    For example, suppose we have already input several numbers into column B which represent the amount of money we have paid for various items which have been placed into column A.



    We wish to place in column C the amount of tax that we paid on the item. The amount of tax that is paid on each item is 15%, but that is paid only after a 10% discount on the price has been given. We place this formula into cell C1 to write the amount of tax that we pay on the magazine.



    Instead of having to type the same formula over again in cells C2, C3, and C4, we can take advantage of the drag-and-copy feature of Microsoft Excel. We simply move the mouse pointer to cell C1 and make it the active cell.



    Notice that the formula that I typed in is displayed in the Formula Bar.

    Move the mouse pointed to the lower right hand corner of the active cell until the mouse pointer turns into a plus sign. Then hold down the left mouse button and move the mouse pointer until cells C2,C3, and C4 are included, and then let up on the left mouse pointer.



    Now let us place into column D the actual amount that we paid on each item.





    Now in row 5 suppose we want to place the total for our items. In cell B5 we want to place the total original amount of the items. So we go to cell B5 and click the equal sign to the left of the Formula Bar. Then click Sum, and you will see the following.



    Sum is an example of a built-in function. In the box Number1 we can place a range of cells.

    A range is a rectangular group of selected cells. We indicate a range by using a colon. Therefore, the range which consists of cells B1,B2,B3, and B4. We identify the range by B1:B4.

    Once we click OK the sum of the contents of cells B1 through B4 are placed into cell B5.



    Now we may copy this formula to cells C5 and D5 by using the procedure we used before.

    Notice one odd thing. The formula that is placed into cell B5 is =SUM(B1:B4), and when we copied this formula to cell C5, the formula became =SUM(C1:C5).



    The reason for this is that when we typed the formula into cell B5 we used relative addressing.

    Relative Addressing means that when we reference a cell in our formula, the position of that cell relative to the active cell is stored. When we copy that formula, then in the new location the cell's contents which are actually used is the cell which is at the corresponding position to the new cell.

    For example, suppose in cell A1 we place the formula =C1+D1. Notice that relative to cell A1, cell C1 is 0 rows away and 2 columns to the right, and relative to cell A1, cell D1 is 0 rows away and 3 columns to the right. Then if we copied the formula from cell A1 to cell B1, then the formula that appears is the sum of the cell 0 rows down and 2 columns to the right and the cell 0 rows down and 3 columns to the right. So the formula that would appear in cell B1 is D1+E1.

    Absolute Addressing means that we use the actual cell which is referenced no matter what the position is relative to the active cell. To indicate an absolute reference we use a dollar sign $. Keep in mind that if we want to make an absolute reference, then you are able to make either the row or column absolute. You can also make one be absolute and the other be relative if you wish.

    We may copy formulas from one cell to another even if they are not contiguos. To accomplish this we use the manual cut/copy/paste operations. We can find these options under the Edit Menu, and there are shortcut icons on the Standard Toolbar.

    For example, suppose we place the formula =$B1+C$2-D2+E3 in cell A1, and then copy this formula to cell C3. What will be the formula that appears in the Formula Bar when C3 is the active cell?


    Other Features of the Spreadsheet


    There are many other features that Microsoft Excel has. We will be looking at a few of them this semesters. Some of the ones that are important to us are
    1. Changing the size of a row or column. We have the ability to increase the column width and the row height. This is necessary for example if we are typing a label into a cell which is longer than the cell can contain. While we are typing the excess text spills into the adjacent cell to the right. It is a simple matter to increase the column width so it can contain the entire label.

      Simply go to the Format Menu and select Column and then in the list that appears select Width. Then choose the new Width. We can also select Row and in the list that appears select Height to change the row height.

    2. If we wish to clear an area of the spreadsheet, then we simply select (highlight) the area, go to the Edit Menu, and then select Clear, and then select All.

    3. We can also change the style of labels in the spreadsheet with the Formatting Toolbar.

    4. There are many built-in functions which can be applied to data ranges. You can see a list of these if you go to the Insert Menu and select Formula.

    Templates


    You will be using templates in your Spreadsheet Assignment. A template is simly a boilerplate spreadsheet in which you will later place data. We will look more closely at this idea in the next laboratory. For the remainder of this laboratory, you may experiment with this notion. Try creating a simple spreadsheet in which one cell will contain the output of some function based on some of the other cells in the spreadsheet.