21
Chapter-2 Digital Data Analysis 1. Securing Spreadsheets How to Password Protect Excel Files Encrypting and password protecting Microsoft Word and Excel files is a simple matter. There are a couple of simple rules to remember, though. First, if you are emailing a password protected file, DO NOT sends the password in the email along with the password protected file. Instead, have the recipient call you on the phone for it. Second, DO NOT use a password you normally use try to make up a new one each time. That way, everybody you email a file to won’t have your personal password(s). Finally, if you will be setting both an open and modify password, it is best to make them different. The point of setting a modify password is to keep people from changing the document/spreadsheet. If both protections are used, and both passwords are the same, when the password is entered to open the document, then it also becomes modifiable, thus defeating the purpose of setting a modify password. Microsoft Office 2007 : To encrypt files in Microsoft Office 2007 first open your Word document or Excel spreadsheet. Then click the Office button in the top left corner of your window and choose “Prepare”. Now click “Encrypt Document” and enter the desired password when prompted.

Chapter-2 Digital Data Analysis - WordPress.com · Chapter-2 Digital Data Analysis 1. Securing Spreadsheets How to Password Protect Excel Files Encrypting and password protecting

  • Upload
    others

  • View
    17

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Chapter-2 Digital Data Analysis - WordPress.com · Chapter-2 Digital Data Analysis 1. Securing Spreadsheets How to Password Protect Excel Files Encrypting and password protecting

Chapter-2 Digital Data Analysis

1. Securing Spreadsheets How to Password Protect Excel Files Encrypting and password protecting Microsoft Word and Excel files is a simple matter. There are a couple of simple rules to remember, though. First, if you are emailing a password protected file, DO NOT sends the password in the email along with the password protected file. Instead, have the recipient call you on the phone for it. Second, DO NOT use a password you normally use – try to make up a new one each time. That way, everybody you email a file to won’t have your personal password(s). Finally, if you will be setting both an open and modify password, it is best to make them different. The point of setting a modify password is to keep people from changing the document/spreadsheet. If both protections are used, and both passwords are the same, when the password is entered to open the document, then it also becomes modifiable, thus defeating the purpose of setting a modify password. Microsoft Office 2007: To encrypt files in Microsoft Office 2007 first open your Word document or Excel spreadsheet. Then click the Office button in the top left corner of your window and choose “Prepare”.

Now click “Encrypt Document” and enter the desired password when prompted.

Page 2: Chapter-2 Digital Data Analysis - WordPress.com · Chapter-2 Digital Data Analysis 1. Securing Spreadsheets How to Password Protect Excel Files Encrypting and password protecting

You may also set files to require a password to be modified. This is only necessary if the integrity of the data must be maintained. To set this option, click the Office button in the top left corner of your window and choose “Save As”.

When the save window comes up, click the “Tools” drop-down menu (next to the “Save” button) and choose “General Options”.

Page 3: Chapter-2 Digital Data Analysis - WordPress.com · Chapter-2 Digital Data Analysis 1. Securing Spreadsheets How to Password Protect Excel Files Encrypting and password protecting

Enter the desired password in the “Password to modify:” field and click “OK”.

Once the password is set, you can click “Save” in the “Save As” window that should still be open to save the file with its new password restriction. This can also be done to previously created files as needed, so old files that need to be protected will not need to be recreated. You can set the encryption password here as well, in the “Password to open:” field, so if you will be setting both passwords routinely, you can save some time and set both right here.

Page 4: Chapter-2 Digital Data Analysis - WordPress.com · Chapter-2 Digital Data Analysis 1. Securing Spreadsheets How to Password Protect Excel Files Encrypting and password protecting

2. Creating Charts In Microsoft Excel, you can represent numbers in a chart. On the Insert tab, you can choose from a variety of chart types, including column, line, pie, bar, area, and scatter. The basic procedure for creating a chart is the same no matter what type of chart you choose. As you change your data, your chart will automatically update. You select a chart type by choosing an option from the Insert tab's Chart group. After you choose a chart type, such as column, line, or bar, you choose a chart sub-type. For example, after you choose Column Chart, you can choose to have your chart represented as a two-dimensional chart, a three-dimensional chart, a cylinder chart, a cone chart, or a pyramid chart. There are further sub-types within each of these categories. As you roll your mouse pointer over each option, Excel supplies a brief description of each chart sub-type. Create a Chart

To create the column chart shown above, start by creating the worksheet below exactly as shown.

After you have created the worksheet, you are ready to create your chart.

Page 5: Chapter-2 Digital Data Analysis - WordPress.com · Chapter-2 Digital Data Analysis 1. Securing Spreadsheets How to Password Protect Excel Files Encrypting and password protecting

EXERCISE 1

Create a Column Chart.

1. Select cells A3 to D6. You must select all the cells containing the data you want in your chart. You should also include the data labels.

2. Choose the Insert tab. 3. Click the Column button in the Charts group. A list of column chart sub-types types

appears. 4. Click the Clustered Column chart sub-type. Excel creates a Clustered Column chart and

the Chart Tools context tabs appear. Apply a Chart Layout

Context tabs are tabs that only appear when you need them. Called Chart Tools, there are three chart context tabs: Design, Layout, and Format. The tabs become available when you create a new chart or when you click on a chart. You can use these tabs to customize your chart. EXERCISE 2

Apply a Chart Layout

1. Click your chart. The Chart Tools become available. 2. Choose the Design tab. 3. Click the Quick Layout button in the Chart Layout group. A list of chart layouts appears.

Page 6: Chapter-2 Digital Data Analysis - WordPress.com · Chapter-2 Digital Data Analysis 1. Securing Spreadsheets How to Password Protect Excel Files Encrypting and password protecting

4. Click Layout 5. Excel applies the layout to your chart. Add Labels

When you apply a layout, Excel may create areas where you can insert labels. You use labels to give your chart a title or to label your axes. When you applied layout 5, Excel created label areas for a title and for the vertical axis. EXERCISE 3

Add labels

Before After

1. Select Chart Title. Click on Chart Title and then place your cursor before the C in Chart and hold down the Shift key while you use the right arrow key to highlight the words Chart Title.

2. Type Toy Sales. Excel adds your title. 3. Select Axis Title. Click on Axis Title. Place your cursor before the A in Axis. Hold down the

Shift key while you use the right arrow key to highlight the words Axis Title. 4. Type Sales. Excel labels the axis. 5. Click anywhere on the chart to end your entry.

Change the Style of a Chart

A style is a set of formatting options. You can use a style to change the color and format of your chart. Excel 2007 has several predefined styles that you can use. They are numbered from left to right, starting with 1, which is located in the upper-left corner. EXERCISE 4

Change the Style of a Chart

1. Click your chart. The Chart Tools become available.

Page 7: Chapter-2 Digital Data Analysis - WordPress.com · Chapter-2 Digital Data Analysis 1. Securing Spreadsheets How to Password Protect Excel Files Encrypting and password protecting

2. Choose the Design tab.

3. Click the More button in the Chart Styles group. The chart styles appear.

4. Click Style 42. Excel applies the style to your chart.

Move a Chart to a Chart Sheet

By default, when you create a chart, Excel embeds the chart in the active worksheet. However, you can move a chart to another worksheet or to a chart sheet. A chart sheet is a sheet dedicated to a particular chart. By default Excel names each chart sheet sequentially, starting with Chart1. You can change the name. EXERCISE 5

Move a Chart to a Chart Sheet

1. Click your chart. The Chart Tools become available. 2. Choose the Design tab. 3. Click the Move Chart button in the Location group. The Move Chart dialog box appears.

Page 8: Chapter-2 Digital Data Analysis - WordPress.com · Chapter-2 Digital Data Analysis 1. Securing Spreadsheets How to Password Protect Excel Files Encrypting and password protecting

4. Click the New Sheet radio button. 5. Type Toy Sales to name the chart sheet. Excel creates a chart sheet named Toy Sales and

places your chart on it.

3. Creating and Using Macros

Definition of an Macro

Macros are sets of instructions in Microsoft Excel for tasks to perform on a given worksheet or data. By recording or programming certain actions, Excel users utilize macros to automate repetitive tasks, format data sheets, or perform complex mathematical operations. By using macros, Excel users can launch a virtually infinite number of tasks and processes with the simple touch of one button, greatly speeding complicated spreadsheet work. The file extension of a macro is commonly .MAC.

How to Write a Simple Macro in Microsoft Excel

1 Click the Developer tab on the Ribbon at the top of the screen. If the tab is not showing up on your screen, you can add it as follows:

For Excel 2010: click the File Tab then select options. On the left hand side of the Excel options dialog box, click Customize Ribbon. Then, on the right hand side box select Developer.

For Excel 2007: click the Microsoft Office button, then Excel Options. In the Popular

category, under Top Options for Working with Excel, select Show Developer Tab in Ribbon.

Page 9: Chapter-2 Digital Data Analysis - WordPress.com · Chapter-2 Digital Data Analysis 1. Securing Spreadsheets How to Password Protect Excel Files Encrypting and password protecting

And

2 Change the security settings. In Trust Centre, Under Macro Settings, click Enable All Macros, and then click OK. Note that this security setting is not ideal for basic use. When you've finished creating your macro, go back and un-click Enable All Macros.

3 Click Record Macro. You'll find it on the Developer tab under Code.

Page 10: Chapter-2 Digital Data Analysis - WordPress.com · Chapter-2 Digital Data Analysis 1. Securing Spreadsheets How to Password Protect Excel Files Encrypting and password protecting

4 Name your macro. The first character of the name must be a letter; after that, you can use characters, numbers and underscores. Macro names cannot have spaces.

Don't use the same name for your macro as an existing cell reference.

5 Set a shortcut for your macro (optional). Type a letter in the Shortcut Key box. A lowercase letter will translate to CTRL + letter; an uppercase letter will be CTRL + SHIFT + letter.

6 Choose where to store your macro. In the Store Macro In list, select the workbook where you want to store the macro. If you want it to be available whenever you run Excel, select Personal Macro Workbook.

Page 11: Chapter-2 Digital Data Analysis - WordPress.com · Chapter-2 Digital Data Analysis 1. Securing Spreadsheets How to Password Protect Excel Files Encrypting and password protecting

7 Describe your macro. Write this in the Description box.

8 Click OK to start recording your macro.

9 Perform the actions you want the macro to record.

10 Stop recording. Go to the Developer tab, click Code, and then click Stop Recording.

Page 12: Chapter-2 Digital Data Analysis - WordPress.com · Chapter-2 Digital Data Analysis 1. Securing Spreadsheets How to Password Protect Excel Files Encrypting and password protecting

4. Managing Multiple Spreadsheets and Workbooks

Adding and Deleting Worksheets When creating a new workbook, Excel provides you with three default worksheets, named Sheet 1, Sheet 2 and Sheet 3. To insert additional worksheets, use the Insert Worksheet icon at the end of the sheet tabs. Excel will insert a new worksheet at the very end of the sheet tab. To specify where you want to insert a new sheet, click on the worksheet tab of the sheet to the left of which you want to insert a new sheet, right-click on the active sheet tab and then choose Insert from the contextual menu. To delete a worksheet, click the Delete arrow on the Home Ribbon and choose Delete Sheet. Excel will delete the active worksheet. To Insert a New Worksheet 1. Click the Insert Worksheet icon at the end of the sheet tabs Or Right-click on the sheet tab to the left of which you want to insert a new sheet and then choose Insert from the contextual menu. Or Click on the sheet tab to the left of which you want to insert a new sheet and then Press Shift + F11 Or Click on the sheet tab to the left of which you want to insert a new sheet, click the Insert Cells button on the Home Ribbon and choose Insert Sheet from the contextual menu. To Delete a Worksheet 1. Click on the tab of the sheet to be deleted. 2. Click the Delete arrow on the Home Ribbon and choose Delete Sheet. Or Right-Click on the tab of the sheet you wish to delete and then choose Delete from the contextual menu. Copying Worksheets You can copy an entire worksheet in Excel, including all of its data and formatting by using the Move or Copy Sheet command from the menu. Excel provides a sequential number after the worksheet name to allow you to distinguish between the new sheet and the original sheet. For example, if you copied a sheet named June Sales, the new copied sheet would be named June Sales (2). You can copy a worksheet to any workbook that is open, to the current workbook or to a new workbook file. You can also copy a worksheet manually by pressing and holding the Ctrl key and then dragging the worksheet tab with your mouse to the new location. To Copy a Worksheet 1. Click on the Worksheet tab of the sheet you wish to copy. 2. Right-click and choose Move or Copy from the contextual menu. Or

Page 13: Chapter-2 Digital Data Analysis - WordPress.com · Chapter-2 Digital Data Analysis 1. Securing Spreadsheets How to Password Protect Excel Files Encrypting and password protecting

Click the Format button on the Home Ribbon under the Cells group and choose Move or Copy Sheet under the Organize Sheets category. 3. Select the Workbook into which you wish you copy the worksheet (the default is the current workbook). 4. Select the location of the new sheet in the Before Sheet list box. 5. Click the check box next to Create a Copy to copy the worksheet rather than move it. 6. Click OK. Or 1. Press and hold the Ctrl key, and then drag with your mouse to the desired location). Renaming Worksheets Excel by default provides the generic names of Sheet 1, Sheet 2 and Sheet 3, etc. to worksheets. To rename a worksheet, double-click on the tab of the worksheet to receive the new name and then type in the desired new name. Another way to rename a worksheet is to right-click on the worksheet tab, select Rename from the contextual menu, and then type the new name. To Rename a Worksheet 1. Double-click on the worksheet tab of the sheet to be renamed. Or Right-click on the worksheet tab of the sheet to be renamed and then choose Rename from the contextual menu. Or Click the Format button on the Home Ribbon under the Cells group and choose Rename Sheet under the Organize Sheets category. 2. Type the new name. 3. Press Enter. Repositioning Worksheets After you begin creating worksheets in your workbook, you may decide that the worksheets are not in the order that you would like. You can rearrange the worksheets in your workbook by clicking the tab of the worksheet you would like to move and then dragging it to the new location. As you drag, a small black arrow appears marking the new location of the sheet should you release the mouse button. To Reposition a Worksheet 1. Click and hold the left mouse button on the tab of the worksheet you wish to move. 2. Drag the worksheet to the new location. 3. Release the mouse button. Tip: You can also move worksheets from the Move or Copy dialog box.

Page 14: Chapter-2 Digital Data Analysis - WordPress.com · Chapter-2 Digital Data Analysis 1. Securing Spreadsheets How to Password Protect Excel Files Encrypting and password protecting

Grouping Worksheets Excel allows you to work on several worksheets simultaneously by grouping them together. When worksheets are grouped, any formatting, data entry or changes you make to the active sheet are made to every sheet in the group. Grouping sheets is a quick way to apply formatting to or delete several sheets at once. When multiple worksheets are grouped together, [Group] appears in the title bar on top of the worksheet window. To Group Worksheets 1. Click the tab of the first worksheet in your group. 2. Hold down the Ctrl key and then click the tabs of any additional sheets you want to include in your group. 3. To group all worksheets, right-click on any worksheet tab and choose Select All Sheets from contextual menu. To Ungroup Worksheets 1. Click the tab of any worksheet not in your group Or Right-click the tab of any grouped worksheet and select Ungroup Sheets from the pop-up menu. Changing Worksheet Tab Colors Excel provides the option of applying colors to your worksheet tabs. This can be useful if you have a large workbook comprised of many worksheets. You might want to give each worksheet in a particular group a different color. The tab color only appears when the worksheet is not the active worksheet. To Change the Worksheet Tab Color 1. Select the tab of the worksheet or worksheets to which you wish to apply a color. 2. Click the Format button on the Home Ribbon under the Cells group and choose Tab Color under the Organize Sheets category. Or Right-click on the tab for the worksheet or worksheet group and then choose Tab Color from the contextual menu. 3. Choose a color from the Format Tab Color Palette. To Remove a Tab Color 1. Select the tab of the worksheet or worksheets whose color you wish to remove. 2. Click the Format button on the Home Ribbon under the Cells group and choose Tab Color under the Organize Sheets category. Or Right-click on the tab of the worksheet or worksheet group and then choose Tab Color from the pop-up menu. 3. Choose No Color from the Format Tab Color Palette.

Page 15: Chapter-2 Digital Data Analysis - WordPress.com · Chapter-2 Digital Data Analysis 1. Securing Spreadsheets How to Password Protect Excel Files Encrypting and password protecting

Using 3-D Formulas & References When you want to create a formula which uses data from several worksheets, you create a 3-D Formula. A 3-D Formula is created using 3-D References; that is to say, references to cells in a different worksheet. To create a 3-D Reference, the format is: “Sheet Name‟!Cell Name For example, suppose we have three sheets named 2000, 2001 and Yearly Totals. In the Yearly Totals sheet, we want to calculate the sum of the values in cell C18 from both the 2000 and 2001 sheets. Thus, our formula in the Yearly Totals worksheet would be: =„2001‟! C18 + „2000‟! C18 To use a function such as SUM, AVERAGE, etc. in our 3-D formula, the format is: =SUM („Sheet1:Sheet2‟! C12:C35) You can create your 3-D formula yourself by typing it into the cell or you can manually select the appropriate worksheets and cells to include in your formula. To Create a 3-D Formula 1. In the cell where you want your formula to display, type = and the beginning of the formula, such as: =Sum( 2. Group the worksheets whose data you will include in the formula if the data is in the same cell address in each worksheet. 3. Select the cell or cell range to include in the formula. 4. Type the remainder of the formula if applicable and press Enter.

5. Organising and handling Spreadsheet Data

Use a Pivot Table in Excel 2007 for Data Organization. Pivot tables are an Excel feature that you should learn how to use. Instead of analysing rows upon rows of records, a pivot table can aggregate your data and show a new perspective and few clicks. You can also move columns to rows or vice versa. The problem is people believe creating a pivot table is too difficult to learn. What is a Pivot Table? You might think of a pivot table as a user created summary table of your original spreadsheet. You create the table by defining which fields to view and how the data should be displayed. Based on your field selections, Excel aggregates and organizes the data so you see a different view of your data. As example, I’ve uploaded a sample spreadsheet of 4000 fictitious voters, which includes the following data fields:

Voter ID

Party Affiliation

Their precinct

Age group

When they last voted

Years they’ve been registered

Page 16: Chapter-2 Digital Data Analysis - WordPress.com · Chapter-2 Digital Data Analysis 1. Securing Spreadsheets How to Password Protect Excel Files Encrypting and password protecting

Ballot status

Looking at the first 20 data records, you can see the data is boring. It’s enough to make you roll your eyes and fall asleep. In this format, the key question it answers is how many voters exist in all the precincts. Using Excel pivot tables, you can organize and group the same data in ways that start to answer questions such as:

What is the party breakdown by precinct?

Do voters use permanent absentee ballots?

Which precincts have the most Democrats?

How many voter pamphlets do I need for Precinct 2416?

Do 18-21 year olds vote?

A pivot tables allow you to group the spreadsheet or external data source by any of your data fields. The thumbnail below shows a count of voters by party by precinct.

Page 17: Chapter-2 Digital Data Analysis - WordPress.com · Chapter-2 Digital Data Analysis 1. Securing Spreadsheets How to Password Protect Excel Files Encrypting and password protecting

Using a pivot table, I can continue to slice the data by selecting additional fields from the PivotTable Field List. For example, I can take the same data and segment by voter age group.

Understanding the Pivot Table Structure in the thumbnail above, I’ve labelled the main areas of the pivot table. (1) PivotTable Field List –this section in the top right displays the fields in your spreadsheet. You may check a field or drag it to a quadrant in the lower portion. (2) The lower right quadrants- this area defines where and how the data shows on your pivot table. You can have a field show in either a column or row. You may also indicate if the data should be counted, summed, averaged, filtered and so on. (3) The red outlined area to the left is the result of your selections from (1) and (2). You’ll see that the only difference I made in the last pivot table was to drag the AGE GROUP field underneath the PRECINCT field in the Row Labels quadrant. How to Create a Pivot Table There are several ways to build a pivot table. Excel has logic that knows the field type and will try to place it in the correct row or column if you check the box. For example, data that is

Page 18: Chapter-2 Digital Data Analysis - WordPress.com · Chapter-2 Digital Data Analysis 1. Securing Spreadsheets How to Password Protect Excel Files Encrypting and password protecting

numeric such as Precinct counts tends to appear to the right in columns. Data, which is textual, such as Party would appear in rows. While you can simply heck fields to display and let Excel build your pivot table, I prefer to use the “drag and drop” method. This is partly because I like to visualize my data in columns and rows. I think it may also be easier if you have fields, which can appear to be numbers like a precinct value. 1. Open your original spreadsheet and remove any blank rows or columns. 2. Make sure each column has a heading, as it will be carried over to the Field List. 3. Make sure your cells are properly formatted for their data type. 4. Highlight your data range. 5. Click the Insert tab. 6. Select the Pivot Table button from the Tables group. 7. Select PivotTable from the list.

The Create PivotTable dialog appears.

Page 19: Chapter-2 Digital Data Analysis - WordPress.com · Chapter-2 Digital Data Analysis 1. Securing Spreadsheets How to Password Protect Excel Files Encrypting and password protecting

8. Double-check your Table/Range:value. 9. Select the radio button for New Worksheet. 10. Click OK. A new worksheet opens with a blank pivot table. You’ll see that the fields from our source spreadsheet were carried over to the PivotTable Field List.

11. Drag an item such as PRECINCT from the PivotTable Field List down to the Row Labels quadrant. The left side of your Excel spreadsheet should show a row for each precinct value. You should also see a checkmark appear next to PRECINCT.

Page 20: Chapter-2 Digital Data Analysis - WordPress.com · Chapter-2 Digital Data Analysis 1. Securing Spreadsheets How to Password Protect Excel Files Encrypting and password protecting

12. The next step is to ask what you would like to know about each precinct. I’ll drag the PARTY field from the PivotTable Field List to the Column Labels quadrant. This will provide an additional column for each party. Note that you won’t see any numerical data.

13. To see the count for each party, I need to drag the same field to the Values quadrant. In this case, Excel determines I want a Count of PARTY. I could double- click the entry and choose another Field Setting. Excel has also added Grand Totals. But wait....there’s more....and some of the same As you build your pivot table, you’ll probably think of additional ways to group the information. For example, you might want to know the Age Range of voters by Precinct by Party. In this case, I would drag the AGE GROUP column from the PivotTable Field List down below the PRECINCT value in Row Labels.

Page 21: Chapter-2 Digital Data Analysis - WordPress.com · Chapter-2 Digital Data Analysis 1. Securing Spreadsheets How to Password Protect Excel Files Encrypting and password protecting

Each age group is broken out and indented by precinct. At this stage, you might also be thinking of usability. As with a regular spreadsheet, you may manipulate the fields. For example, you might want to rename “Grand Total” to “Total” or even collapse the age values for one or more precincts. You can also hide or show rows and columns. These features work the same way as a regular spreadsheet. One area that is different is the pivot table has its own options. You can access these options by right- clicking a cell within and selecting PivotTable Options...For example, you might only want Grand Totals for columns and not rows. There are also ways to filter the data using the controls next to Row Labels or Column Labels on the pivot table. You may also drag fields to the Report Filter quadrant.