Top Banner
Excel 2007 Part (2) Dr. Susan Al Naqshbandi [email protected]
21
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Excel 2007 Part (2) Dr. Susan Al Naqshbandi S.alNaqshabandi@uvt.nl.

Excel 2007Part (2)

Dr. Susan Al [email protected]

Page 2: Excel 2007 Part (2) Dr. Susan Al Naqshbandi S.alNaqshabandi@uvt.nl.

Excel Basics

1: Sorting, Grouping, and Filtering Cells 2: Formatting Tables3: Working with some important Functions 4: Assignment

Page 3: Excel 2007 Part (2) Dr. Susan Al Naqshbandi S.alNaqshabandi@uvt.nl.

Sorting, Grouping, and Filtering

A Microsoft Excel spreadsheet can contain a great deal of information. Sometimes you may find that you need to reorder or sort that information, create groups, or filter information to be able to use it most effectively. Sorting Sorting lists is a common spreadsheet task that allows you to easily reorder your data. The most common type of sorting is alphabetical ordering, which you can do in ascending or descending order.To Sort in Alphabetical Order:Select a cell in the column you want to sort (In this example, we choose a cell in column A).Click the Sort & Filter command in the Editing group on the Home tab. Select Sort A to Z. Now the information in the Category column is organized in alphabetical order.

You can Sort in reverse alphabetical order by choosing Sort Z to A in the list.To Sort from Smallest to Largest:Select a cell in the column you want to sort (a column with numbers).Click the Sort & Filter command in the Editing group on the Home tab. Select From Smallest to Largest. Now the information is organized from the smallest to largest amount.You can sort in reverse numerical order by choosing From Largest to Smallest in the list.

Page 4: Excel 2007 Part (2) Dr. Susan Al Naqshbandi S.alNaqshabandi@uvt.nl.

Sorting, Grouping, and Filtering

To Sort Multiple Levels:•Click the Sort & Filter command in the Editing group on the Home tab. •Select Custom Sort from the list to open the dialog box. OR •Select the Data tab.•Locate the Sort and Filter group. •Click the Sort command to open the Custom Sort dialog box. From here, you can sort by one item, or multiple items•Click the drop-down arrow in the Column Sort by field, and choose one of the options. In this example, Category.

Page 5: Excel 2007 Part (2) Dr. Susan Al Naqshbandi S.alNaqshabandi@uvt.nl.

Sorting, Grouping, and Filtering

•Choose what to sort on. In this example, we'll leave the default as Value.•Choose how to order the results. Leave it as A to Z so it is organized alphabetically.•Click Add Level to add another item to sort by.

Page 6: Excel 2007 Part (2) Dr. Susan Al Naqshbandi S.alNaqshabandi@uvt.nl.

Sorting, Grouping, and Filtering

•Select an option in the Column Then by field. In this example, we chose Unit Cost.•Choose what to sort on. In this example, we'll leave the default as Value.•Choose how to order the results. Leave it as smallest to largest.•Click OK.

The spreadsheet has been sorted. All the categories are organized in alphabetical order, and within each category, the unit cost is arranged from smallest to largest.Remember all of the information and data is still here. It's just in a different order.

Page 7: Excel 2007 Part (2) Dr. Susan Al Naqshbandi S.alNaqshabandi@uvt.nl.

Grouping Cells Using the Subtotal CommandGrouping is a really useful Excel feature that gives you control over how the information is displayed. You must sort before you can group. In this section we will learn how to create groups using the Subtotal command.To Create Groups with Subtotals:Select any cell with information in it.Click the Subtotal command. The information in your spreadsheet is automatically selected and the Subtotal dialog box appears

Decide how you want things grouped. In this example, we will organize by Category. Select a function. In this example, we will leave the SUM function selected.Select the column you want the Subtotal to appear. In this example, Total Cost is selected by default.Click OK. The selected cells are organized into groups with subtotals.

Page 8: Excel 2007 Part (2) Dr. Susan Al Naqshbandi S.alNaqshabandi@uvt.nl.

To Collapse or Display the Group:Click the black minus sign, which is the hide detail icon, to collapse the group.Click the black plus sign, which is the show detail icon, to expand the group.Use the Show Details and Hide Details commands in the Outline group to collapse and display the group, as well.

To Ungroup Select Cells:Select the cells you want to remove from the group.Click the Ungroup command. Select Ungroup from the list. A dialog box will appear. Click OK. To Ungroup the Entire Worksheet:Select all the cells with grouping.Click Clear Outline from the menu.

Page 9: Excel 2007 Part (2) Dr. Susan Al Naqshbandi S.alNaqshabandi@uvt.nl.

Filtering CellsFiltering, or temporarily hiding, data in a spreadsheet very easy. This allows you to focus on specific spreadsheet entries.To Filter Data:Click the Filter command on the Data tab. Drop-down arrows will appear beside each column heading.

Page 10: Excel 2007 Part (2) Dr. Susan Al Naqshbandi S.alNaqshabandi@uvt.nl.

Click the drop-down arrow next to the heading you would like to filter. For example, if you would like to only view data regarding Flavors, click the drop-down arrow next to Category.

Uncheck Select All. Choose Flavor.Click OK. All other data will be filtered, or hidden, and only the Flavor data is visible.

Page 11: Excel 2007 Part (2) Dr. Susan Al Naqshbandi S.alNaqshabandi@uvt.nl.

To Clear One Filter:Select one of the drop-down arrows next to a filtered column.Choose Clear Filter From....

To remove all filters, click the Filter command.Filtering may look a little like grouping, but the difference is that now I can filter on another field, if I want to. For example, let’s say I want to see only the Vanilla-related flavors. I can click the drop-down arrow next to Item, and select Text Filters. From the menu, I’ll choose Contains because I want to find any entry that has the word vanilla in it. A dialog box appears. We’ll type Vanilla, and then click OK. Now we can see that the data has been filtered again and that only the Vanilla-related flavors appear.

Page 12: Excel 2007 Part (2) Dr. Susan Al Naqshbandi S.alNaqshabandi@uvt.nl.

Challenge!

•Use the Sort command to sort data alphabetically.•Use the Sort command to sort data numerically from smallest to largest.•Create groups using the Subtotal command.•Practice using the Filter command.

Page 13: Excel 2007 Part (2) Dr. Susan Al Naqshbandi S.alNaqshabandi@uvt.nl.

Formatting Tables

To Format Information as a Table:Select any cell that contains information. Click the Format as Table command in the Styles group on the Home tab. A list of predefined tables will appear.

Left-click a table style to select it. A dialog box will appear. Excel has automatically selected the cells for your table. The cells will appear selected in the spreadsheet and the range will appear in the dialog box.

Change the range listed in the field, if necessary.Verify the box is selected to indicate your table has headings, if it does. Deselect this box if your table does not have column headings.Click OK. The table will appear formatted in the style you chose.By default, the table will be set up with the drop-down arrows in the header so that you can filter the table, if you wish.In addition to using the Format as Table command, you can also select the Insert tab, and click the Table command to insert a table.

Page 14: Excel 2007 Part (2) Dr. Susan Al Naqshbandi S.alNaqshabandi@uvt.nl.

To Modify a Table:Select any cell in the table. The Table Tools Design tab will become active. From here you can modify the table in many ways.

You can: Select a different table in the Table Styles Options group. Click the More drop-down arrow to see more table styles. Delete or add a Header Row in the Table Styles Options group. Insert a Total Row in the Table Styles Options group. Remove or add banded rows or columns. Make the first and last columns bold. Name your table in the Properties group. Change the cells that make up the table by clicking Resize Table.When you apply a table style, filtering arrows automatically appear. To turn off filtering, select the Home tab, click the Sort & Filter command, and select Filter from the list.

Page 15: Excel 2007 Part (2) Dr. Susan Al Naqshbandi S.alNaqshabandi@uvt.nl.

Challenge!

•Format the information in a worksheet as a table.•Format the first column in bold.•Name the table.•Change the table style.•Practice using the other features discussed in this lesson to modify the table in various ways.

Page 16: Excel 2007 Part (2) Dr. Susan Al Naqshbandi S.alNaqshabandi@uvt.nl.

The Excel IF function tests a user-defined condition and returns one result if the condition is true, and another result if the condition is false. The syntax of the function is :

IF( logical_test, value_if_true, value_if_false )

logical_test - The user-defined condition that is to be tested and evaluated as either TRUE or FALSE value_if_true - The result that is to be returned from the function if the supplied logical_test evaluates to TRUE value_if_false - The result that is to be returned from the function if the supplied logical_test evaluates to FALSE

where the arguments are as follows:

1- Conditional Functions (IF)

Page 17: Excel 2007 Part (2) Dr. Susan Al Naqshbandi S.alNaqshabandi@uvt.nl.

If Function Example 1The following example shows the Excel If function applied to two sets of numbers. In

this example, the logical_test checks whether the corresponding value in column B is equal to 0, and the function returns :

The text string "div by zero" if the value in column B is equal to 0 or The value in column A divided by the value in column B if the value in column B is

not equal to zero

If Function Example 2The logical_test within the Excel If function can be any type of expression that returns a TRUE or FALSE result. The following example shows some more examples of the function, using different types of logical_test.

Page 18: Excel 2007 Part (2) Dr. Susan Al Naqshbandi S.alNaqshabandi@uvt.nl.

2- Convert Text to ColumnsSometimes you will want to split data in one cell into two or more cells. You can do this easily by utilizing the Convert Text to Columns Wizard.• Highlight the column in which you wish to split the data• Click the Text to Columns button on the Data tab• Click Delimited if you have a comma or tab separating the data, or click fixed widths to

set the data separation at a specific size.

Page 19: Excel 2007 Part (2) Dr. Susan Al Naqshbandi S.alNaqshabandi@uvt.nl.

3- Move data between rows and columnsCopy the data in one or more columns or rows.Before you paste the copied data, right-click your first destination cell (the first cell of the row or column into which you want to paste your data), and then click Paste Special.In the Paste Special dialog box, select Transpose, and then click OK.You'll find the Transpose check box in the lower-right corner of the dialog box:

Starting with your first cell, Excel pastes the data into a row or column.

Page 20: Excel 2007 Part (2) Dr. Susan Al Naqshbandi S.alNaqshabandi@uvt.nl.

4 - Remove duplicate values

When you remove duplicate values, only the values in the range of cells or table are affected. Any other values outside the range of cells or table are not altered or moved.Because you are permanently deleting data, it's a good idea to copy the original range of cells or table to another worksheet or workbook before removing duplicate values.Select the range of cells, or make sure that the active cell is in a table.On the Data tab, in the Data Tools group, click Remove Duplicates.

Do one or more of the following: Under Columns, select one or more columns.To quickly select all columns, click Select All.To quickly clear all columns, click Unselect All.

If the range of cells or table contains many columns and you want to only select a few columns, you may find it easier to click Unselect All, and then under Columns, select those columns.Click OK.A message is displayed indicating how many duplicate values were removed and how many unique values remain, or if no duplicate values were removed.Click OK.

Page 21: Excel 2007 Part (2) Dr. Susan Al Naqshbandi S.alNaqshabandi@uvt.nl.

AssignmentCat Dog lion

Doc1 0 1 2

Doc2 3 0 0

Doc3 1 5 0

You should do the following calculation to the above table :

1. Find the Average of every word in all the documents (centroid)2. Convert the above table to binary table3. Find the number of documents in which the term occurs (document frequency) 4. Calculate the (tf.idf) of every term in every document.