Google

Tuesday, June 10, 2008

Formatting

Formatting Text

Spreadsheets can be pretty dry, so we need some tools to dress them up a little. We can use most of the tricks in our word processor to do the formatting of text. We can use : bold face, italics, underline, change the color, align (left, right, center), font size, font, etc.

We need to select the cell (or group of cells) that we wish to change the formatting and then go from the FORMAT menu -- down to CELLS -- click on FONT. Here is a picture of what you will see there. Notice that you can choose to change the alignment as well as several other options.




Formatting Numbers

We often need to format the numbers to display the appropriate number of decimals, dollar signs, percentage, red (for negative dollars), etc. It is best to keep numbers describing similar items as uniform as possible.
If we have the number 3.53262624672423, we would probably have to make the column wider and at the least bore most people. We need to set the number of decimal places to what is important. If this was a dollar figure that had calculated tax it should be $3.53.

Here is a screen displaying what you would see if you select a cell (or group of cells) and from the FORMAT menu -- go down to format -- click on number.



Column Width

A question that everyone (who has ever worked on a spreadsheet) has asked at one time or another is, "Where did all my numbers go?" or same question, "Where did all of those ####### come from and why are they in my spreadsheet?"
The problem is the number trying to be displayed in a particular cell does not have enough width to display properly. To clear up the problem we just need to make the column wider. You can do this many ways.

Here are two ways to change the column width

  1. Select the column (or columns) with the problem by clicking on their labels (letters). Then you choose the MENU FORMAT. Go down to COLUMN and over to WIDTH and type in a new number for the column width.

  2. Move the arrow to the right side of the column label and click and drag the mouse to the right (to make wider) or left (to make smaller). Let up on the mouse button when the column is wide enough.

    Notice the cursor changes to a vertical line with arrows pointing left and right.

In many spreadsheets you can also change the vertical height of a row by moving the lower edge of the row title (number).




Charts or Graphing

Numbers can usually be represented quicker and to a larger audience in a picture format. Excel has a chart program built into its main program. The Chart Wizard will step you through questions that will (basically) draw the chart from the data that you have selected. There are many types of charts. The two most widely used are the bar chart and the pie chart.


The BAR Chart is usually used to display a change (growth or decline) over a time period. You can quickly compare the numbers of two different bar charts to each other.

The PIE Chart is usually used to look at what makes up a whole Something. If you had a pie chart of where you spent your money you could look at the percentages of dollars spent on food (or any other category).

You can add legends, titles, and change many of the display variables.

Inserting A Row and a Column

Inserting A Row

Likewise, we can also insert rows. With the row label (number) selected you must choose the Row from the Insert menu. Again this will insert a row before the row you have selected.


The formulas will be updated to their corresponding locations.
C3 was = C2+B3
NOW C4=C2+B4

Inserting A Column

Sometimes we (all) make mistakes or things change. If you have a spreadsheet designed and you forgot to include some important information, you can insert a column into an existing spreadsheet. What you must do is click on the column label (letter) and choose in Columns from the Insert menu. This will insert a column immediately left of the selected column.

As you can see from this example there was a blank column inserted into the spreadsheet. You might wonder if this will affect your referenced formulas. Yes, the Referenced cells are changed to their new locations. For example:
Cell C4 was =C3+B4
and now is =D3+B4



Tuesday, February 26, 2008

Specific Formulas or Functions

SUM Functions

Probably the most popular function in any spreadsheet is the SUM function. The Sum function takes all of the values in each of the specified cells and totals their values. The syntax is:

  • =SUM(first value, second value, etc)
In the first and second spots you can enter any of the following (constant, cell, range of cells).
  • Blank cells will return a value of zero to be added to the total.
  • Text cells can not be added to a number and will produce an error.


Let's use the table here for the discussion that follows:

We will look at several different specific examples that show how the typical function can be used! Notice that in A4 there is a TEXT entry. This has NO numeric value and can not be included in a total.


A
1
25
2
50
3
75
4
test
5


ExampleCells to ADDAnswer
=sum(A1:A3)A1, A2, A3 150
=sum(A1:A3, 100)A1, A2, A3 and 100250
=sum(A1+A4)A1, A4#VALUE!
=sum(A1:A2, A5)A1, A2, A575


Average Function

There are many functions built into many spreadsheets. One of the first ones that we are going to discuss is the Average function. The average function finds the average of the specified data. (Simplifies adding all of the indicated cells together and dividing by the total number of cells.) The syntax is as follows.

  • =Average (first value, second value, etc.)
Text fields and blank entries are not included in the calculations of the Average Function.


Let's use the table here for the discussion that follows:
We will look at several different specific examples that show how the average function can be used!

A
1
25
2
50
3
75
4
100
5


ExampleCells to averageAnswer
=average (A1:A4)A1, A2, A3, A462.5
=average (A1:A4, 300)A1, A2, A3, A4 and 300110
=average (A1:A5)A1, A2, A3, A4, A562.5
=average (A1:A2, A4)A1, A2, A458.33


Max Function

The next function we will discuss is Max (which stand for Maximum). This will return the largest (max) value in the selected range of cells.

  • Blank entries are not included in the calculations of the Max Function.
  • Text entries are not included in the calculations of the Max Function.

Let's use the table here for the discussion that follows.
We will look at several different specific examples that show how the Max functions can be used!

A
1
10
2
20
3
30
4
test
5


Example of MaxCells to look atAns. Max
=max (A1:A4)A1, A2, A3, A4
30
=max (A1:A4, 100)A1, A2, A3, A4 and 100
100
=max (A1, A3)A1, A3
30
=max (A1, A5)A1, A5
10

MIN Function

The next function we will discuss is Min (which stands for minimum). This will return the smallest (Min) value in the selected range of cells.

  • Blank entries are not included in the calculations of the Min Function.
  • Text entries are not included in the calculations of the Min Function.

Let's use the table here for the discussion that follows.
We will look at several different specific examples that show how the min functions can be used!

A
1
10
2
20
3
30
4
test
5


Example of minCells to look atAns. min
=min (A1:A4)A1, A2, A3, A4
10
=min (A2:A3, 100)A2, A3 and 100
20
=min (A1, A3)A1, A3
10
=min (A1, A5)A1, A5 (displays the smallest number)
10

COUNT FUNCTION

The next function we will discuss is Count. This will return the number of entries (actually counts each cell that contains number data) in the selected range of cells.

  • Blank entries are not counted.
  • Text entries are NOT counted.

Let's use the table here for the discussion that follows.
We will look at several different specific examples that show how the Count functions can be used!

A
1
10
2
20
3
30
4
test
5


Example of CountCells to look atAnswer
=Count (A1:A3)A1, A2, A3
3
=Count (A1:A3, 100)A1, A2, A3 and 100
4
=Count (A1, A3)A1, A3
2
=Count (A1, A4)A1, A4
1
=Count (A1, A5)A1, A5
1


COUNT A FUNCTION

The next function we will discuss is CountA. This will return the number of entries (actually counts each cell that contains number data OR text data) in the selected range of cells.

  • Blank entries are not Counted.
  • Text entries ARE Counted.

Let's use the table here for the discussion that follows.
We will look at several different specific examples that show how the CountA functions can be used!

A
1
10
2
20
3
30
4
test
5


Example of CountACells to look at
Answer
=CountA (A1:A3)A1, A2, A3
3
=CountA (A1:A3, 100)A1, A2, A3 and 100
4
=CountA (A1, A3)A1, A3
2
=CountA (A1, A4)A1, A4
2
=CountA (A1, A5)A1, A5
1

IF FUNCTION

The next function we will discuss is IF. The IF function will check the logical condition of a statement and return one value if true and a different value if false. The syntax is

  • =IF (condition, value-if-true, value-if-false)
  • value returned may be either a number or text
  • if value returned is text, it must be in quotes

Let's use the table here for the discussion that follows. We will look at several different specific examples that show how the IF functions can be used!

A
B
1
Price
Over a dollar?
2
$.95
No
3
$1.37
Yes
4comparing # returning #
5
14000
0.08
6
8453
0.05

Example of IF
typed into column B
Compares
Answer
=IF (A2>1,"Yes","No") is ( .95 > 1)
No
=IF (A3>1, "Yes", "No") is (1.37 > 1)
Yes
=IF (A5>10000, .08, .05) is (14000 > 10000)
.08
=IF (A6>10000, .08, .05) is (8453 > 10000)
.05

PMT (loan stuff)

The PMT function returns the periodic (in this case monthly) payment for an annuity (in this case a loan). This is the PMT function that was used for the car purchase in the first example. There are a few things that we must know in order for this function to work. To calculate the loan we must know a combination of the following

  • (rate) interest rate per period
  • (NPER) number of payments until repaid
  • (PV) present value of the loan (amount we are borrowing)
  • (FV) future value of the money (for saving or investing)
  • (type) enter 0 or 1 to indicate when payments are due.

=PMT(rate, NPER, PV, FV, type)

equation goes into c7 =PMT(C4/12,C5,-C3)

C4 is the yearly interest and since it's compounded monthly we divide by 12

C5 is the number of months (# of payments)

-C3 is the amount of money we have (borrow - negative)


Note that the rate is per period. If we have an annual interest rate of 9.6% and we are calculating monthly payments, we must divide the annual interest rate by 12 to calculate the monthly interest rate.

SIN COS TAN etc.

Excel has most of the math and trig functions built into it. If you need to use the SIN, COS, TAN functions, they can be typed into any cell. If you wanted to find:

anglesincostan
REF=sin(REF)=cos(REF)=tan(REF)
00.001.000.00
300.500.870.58
450.710.711.00
901.000.00
1800.00-1.000.00

format for degrees formula = sin (angle * pi()/180) the argument angle is in degrees
format for radians formula = sin (angle) the argument angle is in radians

To calculate trig functions in degrees you must convert them - otherwise excel will calculate them in radians.

You can type in either an actual number for the REF or you can also type in a reference from the excel spreadsheet (like A2).

Function Wizard

In Excel there is a help tool for functions called the Function Wizard.

There are two ways to get the function wizard. If you look at the Standard Toolbar, the function wizard icon looks like the icon on the right.

The other way to get to the function wizard is to go to the Menu INSERT -- down to FUNCTION.

Either way you get there, at this point Excel will list all of the functions available. Upon choosing the function, Excel will prompt you for the information it needs to complete the function. Mini descriptions are available for each of the cells. It is often necessary for you to understand the functions in order to be able to figure out these descriptions.

Yeah, I know it would have been nice to know this earlier, but it is important for you to understand how the functions work before you start using the Function Wizard. It is faster to type the basic function in from the keyboard as opposed to going through the steps of this tool.

Well, that is all of the functions we are going to cover.
On to the next phase.


Copying Formulas

Sometimes when we enter a formula, we need to repeat the same formula for many different cells. In the spreadsheet we can use the copy and paste command. The cell locations in the formula are pasted relative to the position we Copy them from.


ABC
153=A1+B1
282=A2+B2
346=A3+B3
438=? + ?
Cells information is copied from its relative position. In other words in the original cell (C1) the equation was (A1+B1). When we paste the function it will look to the two cells to the left. So the equation pasted into (C2) would be (A2+B2). And the equation pasted into (C3) would be (A3+B3).

If you have a lot of duplicate formulas you can also perform what is referred to as a FILL DOWN. (discussed next).

Fill Down

Often we have several cells that need the same formula (in relationship) to the location it is to be typed into. There is a short cut that is called Fill Down. There are a number of ways to perform this operation. One of the ways is to

  1. select the cell that has the original formula
  2. hold the shift key down and click on the last cell (in the series that needs the formula)
  3. under the edit menu go down to fill and over to down

ABC
153=A1+B1
282 fill down
346fill down
438fill down
Cells information is copied from its relative position. In other words in the original cell (C1) the equation was (A1+B1). When we paste the function it will look to the two cells to the left. So the equation pasted into (C2) would be (A2+B2). And the equation pasted into (C3) would be (A3+B3). And the equation pasted into (C4) would be(A4+B4).

Absolute Positioning

Sometimes it is necessary to keep a certain position that is not relative to the new cell location. This is possible by inserting a $ before the Column letter or a $ before the Row number (or both). This is called Absolute Positioning.

ABC
153=$A$1+$B$1
282=$A$1+$B$1
346=$A$1+$B$1
438=$A$1+$B$1
If we were to fill down with this formula we would have the exact same formula in all of the cells C1, C2, C3, and C4. The dollar signs Lock the cell location to a FIXED position. When it is copied and pasted it remains EXACTLY the same (no relative).

Fill Right

We can also fill right. We must select the original cell (and the cells to the right) and select from the Edit menu -- Fill and Right.

ABC
1=A2+$B$3=B2+$B$3=C2+$B$3
2625
37104
4987
If we were to fill right from A1 to C1 we would get the formulas displayed to the left. Notice that the second part of the equation is FIXED or (ABSOLUTE REFERENCE so always references B3 which is 10).

Answers would be A1=16, B1=12, C1=15.