Excel Handbook

advertisement
EXCEL
PARTICIPANT’S HANDBOOK
Managing Data
TABLE OF CONTENTS
Table of Contents................................................................................................................................................... 0
Managing Data ........................................................................................................................................................ 1
Importing External Data ..................................................................................................................................... 1
.csv comma separated value file.................................................................... Error! Bookmark not defined.
.txt text file ......................................................................................................................................................2
Data From Microsoft Access .......................................................................................................................... 7
Other External Sources .................................................................................. Error! Bookmark not defined.
Setting up Data in Excel ......................................................................................................................................... 8
Create Worksheet Duplicate ............................................................................................................................. 8
Rename worksheets .......................................................................................................................................... 9
Converting Data into a Table ............................................................................................................................ 10
Generating Reports .............................................................................................................................................. 12
Using SparkLines ............................................................................................................................................... 12
Customizing Spark lines .................................................................................................................................... 14
Win/ Loss Sparklines ...................................................................................................................................... 14
Creating Basic Pivot Tables ............................................................................................................................... 15
Formatting the pivot table ............................................................................................................................ 19
Other Options ................................................................................................................................................ 22
Freezing Panes for better navigation ..............................................................................................................23
saving and printing ...............................................................................................................................................25
formats to save in Excel ....................................................................................................................................25
Printing...............................................................................................................................................................25
Printing Active Sheets .................................................................................................................................. 26
To Print the Entire Workbook ...................................................................................................................... 26
Advanced Feature: Import Data from Unlisted Format ..............................................................................27
Activities Index ....................................................................................................... Error! Bookmark not defined.
Faculty Staff Resource Center.............................................................................................................................. 31
What is the Faculty Staff Resource Center?..................................................................................................... 31
Mission ............................................................................................................................................................... 31
IRT Faculty Staff Resource Center
Managing Data – Participant’s Handbook
MANAGING DATA
IMPORTING EXTERNAL DATA
There are many advantages that come with Excel when it comes to working with large sets of data. For
example, in Excel everything is easier to work with, it contains more commands in the ribbon that are easy
to get access to. With Excel you can manage data in other formats such as .csv, txt, Access Database or
other external sources
Opening a .CSV File
Definition: CSV stands for Comma Separated Values, sometimes also called Comma Delimited. A CSV file is
a specially formatted plain text file which stores spreadsheets or basic database-style information in a very
simple format, with one record on each line, and each field within that record separated by a comma.
Important
It is important that the individual “ records” within a CSV file NOT contain commas, as this may break the
simple formatting when using the file in another application.
The best way to Import a .CSV file into Excel is the following:
1. In Excel select File
2. Click Open
3. The Dialog box will appear
4. Click on the location where the .CSV file was saved.
Version 5 – 7/17/2012
http://www.csus.edu/irt/fsrc
1
IRT Faculty Staff Resource Center
Managing Data – Participant’s Handbook
5. Uunder File of Type, click on the drop down arrow on the bottom right- hand side and select Text
Files(*.pm;*.txt;*csv) as shown below.
6. Once you have selected the .CSV file click open and it will automatically be opened in the Excel
spreadsheet.
Opening a .txt text file
These files are also known as Delimited Files, they are a simple way to store data and import or export it
between various applications. Delimited means, data that is separated by specific delimiter characters.
Version 5 – 7/17/2012
http://www.csus.edu/irt/fsrc
2
IRT Faculty Staff Resource Center
Managing Data – Participant’s Handbook
Common delimiters are tab, comma and semicolon. Let’s think of delimited files as the most basic file
format that’s almost uniformly accepted by most spreadsheet and database programs.
A delimited file is of no actual use unless it is converted into some form suitable for analysis and study.
Microsoft makes it easy to convert a delimited file to a spreadsheet in the next few steps.
Let’s start with a text file with some data separated by tabs.
1. Open Excel and select File
2. Click Open
3. The Dialog box will appear
4. Depending where the .txt file is saved, select the location as shown below
Version 5 – 7/17/2012
http://www.csus.edu/irt/fsrc
3
IRT Faculty Staff Resource Center
Managing Data – Participant’s Handbook
5. Before clicking open, at the bottom of the dialog box under File of Type, click on the drop down
arrow on the bottom right- hand side and select Text Files(*.pm;*.txt;*csv) as show below.
6. Click the Open button. The Text Import Wizard dialog window displays. The wizard has three steps
for you to go through to ensure your data is transferred over correctly into Excel.
Version 5 – 7/17/2012
http://www.csus.edu/irt/fsrc
4
IRT Faculty Staff Resource Center
Managing Data – Participant’s Handbook
7. The first step asks you to choose between Delimited or Fixed width as the file type for your data. In
this example and in most cases, data will be delimited which means that fields of data are divided
by commas or tabs. Note: A quick way to check if your data is delimited or fixed width is to open
the data file in Notepad on your computer and see how the data is arranged. In this example the
data in notepad shows fields for each row (record) are separated by tabs which mean it is
delimited.
8. For step 2 the Wizard asks you to set the delimiters for your data. You can choose between
delimiters of Tab, semicolon, comma, space or other. A preview window in the wizard displays how
selecting any of these delimiters will affect how your data is imported into Excel. In our example
the delimiter is “tab”.
Version 5 – 7/17/2012
http://www.csus.edu/irt/fsrc
5
IRT Faculty Staff Resource Center
Managing Data – Participant’s Handbook
9. In the final step, the wizard asks you to select the data format for your data. A preview of your data
on the screen allows you to go through each column of data and specify if the format is general,
text, date etc. Most of the time you will use General format because this converts numeric values
to numbers, dates values to dates, and all other values to text.
10. Click the Finish button. Your data will open up in Excel as shown below.
Version 5 – 7/17/2012
http://www.csus.edu/irt/fsrc
6
IRT Faculty Staff Resource Center
Managing Data – Participant’s Handbook
Data From Microsoft Access
It’s often necessary to convert data stored in an Access database to another format, such as an Excel
workbook. You may wish to take advantage of some of Excel’s unique analytical capabilities or simply
share data with someone unfamiliar with Access. Whatever the reason, the conversion process is fairly
straightforward and quick.
Let’s take a few moments to walk through the process, step-by-step.
1. Open Excel and go to the Data tab.
2. Under the Get External Data group click the From Access button.
3. The Select Data Source window displays. Locate the Access file on your computer and click open.
4. Select the table, report form or query that you wish to import and click open.
Version 5 – 7/17/2012
http://www.csus.edu/irt/fsrc
7
IRT Faculty Staff Resource Center
Managing Data – Participant’s Handbook
5. Next, the Import Data window will appear providing different options of how you would like your
data to be set up, in this case select table.
6. Then click OK. Your Access data will display in Excel.
SETTING UP DATA IN EXCEL
Once you have opened your data from an existing Excel file, from a text or .csv file, you will need to
arrange it in a way that is usable for analysis, and creation of reports or other usable content e.g. charts.
The steps to follow include:
 Making a copy/duplicate of the worksheet that contains our raw data which will be used to analyze
and create reports

Renaming our worksheets for our Raw data and the copy of that data we intend to analyze

Cleaning up our data by using the Remove Duplicates Feature and Sort Feature if needed.

Converting Data into a Table.
CREATE WORKSHEET DUPLICATE
If working with raw data, it’s best that you create a duplicate of the worksheet with raw data to work from
for creation of tables and reports. This prevents you from losing your valuable data. Rather than manually
copying all the data contained in the whole worksheet to another worksheet, Excel lets you instantly make
a copy of any worksheet. The process is the following:
1. At the bottom of your worksheet, click the tab for the worksheet you would like to copy. (i.e. Sheet
1, Sheet 2, etc)
2. Right- Click on the sheet that you have selected and choose the option Move or Copy.
Version 5 – 7/17/2012
http://www.csus.edu/irt/fsrc
8
IRT Faculty Staff Resource Center
Managing Data – Participant’s Handbook
3. The Move or Copy dialog box will appear as shown below. In the To Book field it will display the
name of the current workbook that is open or you can click the dropdown arrow to select another
workbook. Also specify where you want the duplicate worksheet to appear in the workbook. Most
important step: Click on the box where it says Create a Copy.
4. Click the OK button
5. At the bottom of your worksheet you will be able to see the copy that you have created, as shown
below.
RENAME WORKSHEETS
The sheet names that Excel 2010 uses for the tabs in a workbook (Sheet1 through Sheet3) are not very
descriptive. Luckily, you can easily rename a worksheet tab to whatever helps you remember what the
worksheet contains, provided that this descriptive name is no longer than 31 characters.
1. Select the sheet whose tab you want to rename.
The selected worksheet is active and the current sheet name appears in bold letters.
2. Double-Click the sheet tab and select Rename on its shortcut menu.
Version 5 – 7/17/2012
http://www.csus.edu/irt/fsrc
9
IRT Faculty Staff Resource Center
Managing Data – Participant’s Handbook
3. Replace the current name on the sheet tab by typing a new sheet name. You may want to rename
the worksheet that contains your Raw data with the name “Raw Data” and the duplicate
worksheet to the name of the report you intend to create e.g. “Sales Data”.
4. Press Enter. The worksheet will display the new name.
CONVERTING DATA INTO A TABLE
Now that you have opened your data into Excel, have removed duplicates and sorted your data, it is time
to convert your data into a table.
1. Begin by selecting all your data in your worksheet. Be sure to select the column headers if there are
any.
2. Click the Insert Tab and from the Tables Group click the Table command.
Version 5 – 7/17/2012
http://www.csus.edu/irt/fsrc
10
IRT Faculty Staff Resource Center
Managing Data – Participant’s Handbook
3. The Create Table dialog box displays. It will show the data range you selected. Be sure to select the
checkbox next to “My Table has headers” if your table already has column headers so that they can
be included in the table as your main headers.
4. Your data will now appear in table format where you can use the table headers to
manipulate/manage your data further. Also the Table Tools design tab will display. This is where you
can change the table style or do further editing.
Version 5 – 7/17/2012
http://www.csus.edu/irt/fsrc
11
IRT Faculty Staff Resource Center
Managing Data – Participant’s Handbook
GENERATING REPORTS
USING SPARKLINES
One of the cool features of Excel 2010 is the addition of Spark lines. A Sparkline is basically a little chart
displayed in a cell representing your selected data set that allows you to quickly and easily see trends at a
glance.
Inserting Spark lines on your Spreadsheet
1. You will find the Spark lines group located on the Insert Tab.
2. Select the cell or cells where you wish to display your Sparklines.
3. Select the type of Sparkline you’d like to add to your spreadsheet. You’ll notice there are three
types of Sparklines: Line, Column and Win/Loss. In this case I have selected Line.
Version 5 – 7/17/2012
http://www.csus.edu/irt/fsrc
12
IRT Faculty Staff Resource Center
Managing Data – Participant’s Handbook
4. A Create Sparklines pops up and will prompt you to enter a Data Range you are using to create the
Sparklines. You’ll notice that the location range (the range where the Sparklines will appear) is
already filled in.
You can type in the data range manually, or click and drag with your mouse across to select the
data range. This will auto-fill the data range for you. Click OK when you are finished.
5. You will see your Spark lines appear in the desired cells.
Version 5 – 7/17/2012
http://www.csus.edu/irt/fsrc
13
IRT Faculty Staff Resource Center
Managing Data – Participant’s Handbook
CUSTOMIZING SPARK LINES
Column Sparklines display your data in individual columns as opposed to the Line view that were used in
the examples above.
Win/ Loss Sparklines
Win/Loss shows a basic positive or negative representation of the data set.
You can easily switch between different Sparkline types by simply selection the current cell , and then click
the desired type on the Design tab.
Version 5 – 7/17/2012
http://www.csus.edu/irt/fsrc
14
IRT Faculty Staff Resource Center
Managing Data – Participant’s Handbook
CREATING BASIC PIVOT TABLES
A pivot table is a special type of summary table that’s unique to Excel. Pivot tables are great for
summarizing values in a table because they do their magic without making you create formulas to perform
the calculations. Pivot tables also let you play around with the arrangement of the summarized data. It’s
this capability of changing the arrangement of the summarized data on the fly simply by rotating row and
column headings that gives the pivot table its name.
Follow these steps to create a pivot table:
1. Open the worksheet that contains the table you want summarized by pivot table and select any cell
in the table.
(Ensure that the table has no blank rows or columns and that each column has a header)
2. Click the PivotTable button in the Tables group on the Insert tab.
3. Click the top portion of the button, if you click the arrow, click PivotTable in the drop-down menu.
Excel opens the Create PivotTable dialog box and selects all the table data, as indicated by a
marquee around the cell range.
Version 5 – 7/17/2012
http://www.csus.edu/irt/fsrc
15
IRT Faculty Staff Resource Center
Managing Data – Participant’s Handbook
4. If necessary, adjust the range in the Table/Range text box under the Select a Table or Range option
button.
5. Select the location for the pivot table.
6. By default, Excel builds the pivot table on a new worksheet it adds to the workbook. If you want
the pivot table to appear on the same worksheet, click the Existing Worksheet option button and
then indicate the location of the first cell of the new table in the location text box.
7. Click Ok
8. Excel adds a blank grid for the new pivot table and displays a PivotTable field list task pane on the
right side of the worksheet area. The PivotTable Field List task pane is divided into two areas: the
Version 5 – 7/17/2012
http://www.csus.edu/irt/fsrc
16
IRT Faculty Staff Resource Center
Managing Data – Participant’s Handbook
Choose Fields to Add to Report list box with the names of all the fields in the source data for the
pivot table and an area divided into four drop zones (Report Filter, Column Labels, Row Labels and
Values) at the bottom.
9. To complete the pivot table, assign the fields in the PivotTable Field List task pane to the various
parts of the table. You do this by dragging a field name from the Choose Fields to Add to Report list
box and dropping it in one of the four areas below, called drop zones:

Report Filter: This area contains the fields that enable you to page through the data
summaries shown in the actual pivot table by filtering out sets of data- they act as the filters
for the report. So, for example, if you designate the Year Field from a table as a Report
Filter, you can display data summaries in the pivot table for individual years or for all years.

Column Labels: This area contains the fields that determine the arrangement of data shown
in the columns of the pivot table.

Row Labels: This area contains the fields that determine the arrangement of data shown in
the rows of the pivot table.

Values: This area contains the fields that determine which data are presented in the cells of
the pivot table- they are the values that are summarized in its last column.
10. Another box also appears: The PivotTable Field List. This field list will be shown whenever we click
on any cell within the PivotTable.
Version 5 – 7/17/2012
http://www.csus.edu/irt/fsrc
17
IRT Faculty Staff Resource Center
Managing Data – Participant’s Handbook
11. You will be able to move around the fields that you want depending on the areas that you would
like them to be organized as shown below.
Version 5 – 7/17/2012
http://www.csus.edu/irt/fsrc
18
IRT Faculty Staff Resource Center
Managing Data – Participant’s Handbook
12. Then you will be able to get a preview of the pivot table as shown below.
Formatting the pivot table
1. First, we locate the “ Sum of Amount” entry in the Values box, and click on it. A menu appears. We
select Value Field Settings as shown below.
2. Click the Number Format button, and the standard Format Cells box appear:
Version 5 – 7/17/2012
http://www.csus.edu/irt/fsrc
19
IRT Faculty Staff Resource Center
Managing Data – Participant’s Handbook
3. From the Category list, select Accounting for instance, and drop the number of decimal places to 0.
Click Ok a few times to get back to the PivotTable.
Version 5 – 7/17/2012
http://www.csus.edu/irt/fsrc
20
IRT Faculty Staff Resource Center
Managing Data – Participant’s Handbook
Now to format the entire PivotTable there is numerous number of ways, for this example we are going to
do a simple way.
4. Click the PivotTable Tools/Design tab:
5. Then drop down the arrow in the bottom-right of the PivotTable Styles list to see a vast collection
of built-in styles:
6. Finally, choose any one that appeals, and look at the result in your PivotTable.
Version 5 – 7/17/2012
http://www.csus.edu/irt/fsrc
21
IRT Faculty Staff Resource Center
Managing Data – Participant’s Handbook
Other Options
As we can see in the table below, when we introduce Dates, it looks like a very wide table so we would like
to make it look better.
1. To fix this, right-click on any date and select Group from the context-menu.
Version 5 – 7/17/2012
http://www.csus.edu/irt/fsrc
22
IRT Faculty Staff Resource Center
Managing Data – Participant’s Handbook
2. The grouping box appears. We select Months and click OK:
3. Our table should look like this much neater and cleaner.
FREEZING PANES FOR BETTER NAVIGATION
The Freeze Panes command in Excel 2010 lets you freeze portions of a worksheet, typically column and
row headings, so that you can view distant parts of the worksheet while the headings remain in place.
Freezing panes only affects the current worksheet. If you want to freeze other worksheets, you must
select them individually and freeze them.
Follow these steps to freeze panes in a worksheet:
1. Position the cell cursor based on what you want to freeze:

Columns: Select the column to the right of the columns you want to freeze. For example, click any
cell in column B to freeze column A.

Rows: Select the row below the rows you want to freeze. For example, click any cell in row 4 to
freeze rows 1, 2, and 3.
Version 5 – 7/17/2012
http://www.csus.edu/irt/fsrc
23
IRT Faculty Staff Resource Center
Managing Data – Participant’s Handbook
 Columns and rows: Click the cell below the rows and to the right of the columns you want to freezeessentially, the first cell that isn’t frozen. For example, click cell B2 to freeze both column A and
row1.
2. In the window group of the View tab, choose Freeze Panes.
3. A thin black line separates the sections. As you scroll down and to the right, notice that the columns
above and rows to the left of the cell cursor remain fixed.
4. In the Window group of the View tab, choose Freeze panes> Unfreeze Panes to unlock the fixed
rows and columns.
Version 5 – 7/17/2012
http://www.csus.edu/irt/fsrc
24
IRT Faculty Staff Resource Center
Managing Data – Participant’s Handbook
SAVING AND PRINTING
FORMATS TO SAVE IN EXCEL
As you work in Microsoft Excel 2010, remember to save your work often or you risk losing your data if the
computer crashes or the power goes out. When you save an Excel workbook for the first time, you see the
Save As dialog box. The appearance and functionality of the Save As dialog box varies depending on
whether you’re running Excel 2010 on Windows 7 or Vista or on Windows XP.
Follow these steps to save your work workbook when running Excel 2010 on Windows 7 or Vista:
1. Choose the File tab and select Save As.
2. The Save As window will appear.
3. Under Save as Type you will see several formats that you can save your document.
4. Once you have selected the format that you would like to save your worksheet, give a name to your
worksheet under File Name.
5. Finally, click Save.
PRINTING
There are many choices you can make when printing an Excel workbook. You can choose what parts of a
workbook to print and how the data fits on the page.
Version 5 – 7/17/2012
http://www.csus.edu/irt/fsrc
25
IRT Faculty Staff Resource Center
Managing Data – Participant’s Handbook
Printing Active Sheets
If you have multiple worksheets in your workbook, you will need to decide if you want to print the whole
workbook or specific worksheets. Excel gives you the option to Print Active Sheets. A worksheet is
considered active if it is selected.
1. Select the worksheets you want to print. To print multiple worksheets, click on the first worksheet,
hold down the CTRL key, then click on the other worksheets you want to select.
2. Click the File tab.
3. Select Print to access the Print pane
4. Select Print Active Sheets from the print range drop-down menu
5. Click the Print button.
To Print the Entire Workbook
Printing a selection (sometimes called setting the print area) lets you choose which cells to print, as
opposed to the entire worksheet.
1. Select the cells that you want to print.
2. Click the File tab.
3. Select Print to access the Print pane.
4. Select Print Selection from the print range drop-down menu.
Version 5 – 7/17/2012
http://www.csus.edu/irt/fsrc
26
IRT Faculty Staff Resource Center
Managing Data – Participant’s Handbook
5. You can see what your selection will look like on the page in Print Preview.
6. Click the Print button.
Advanced Feature: Import Data from Unlisted Format
Microsoft Query is one of the most popular techniques to import data from external data sources into your
Excel sheet. It offers a very flexible way of importing data such that if the data changes in the source
database then you can also get the latest updates in your Excel sheet by just refreshing your spreadsheet.
Let’s see how we can connect your Excel spreadsheet to an MS Access Data Source by using the Microsoft
Query feature.
1. First of all, make sure that your Access Database is up and running, and then head over to the Data
Tab from the Excel spreadsheet.
2. Then choose from the From Microsoft Query option under the Get External Sources category
Version 5 – 7/17/2012
http://www.csus.edu/irt/fsrc
27
IRT Faculty Staff Resource Center
Managing Data – Participant’s Handbook
3. Now choose your data source, i.e. MS Access in our case.
4. Here browse and select the database that you wish to import into your Excel sheet.
Version 5 – 7/17/2012
http://www.csus.edu/irt/fsrc
28
IRT Faculty Staff Resource Center
Managing Data – Participant’s Handbook
5. The tables of the particular database will be displayed, now move the required fields from the
Available Tables and Columns section, to the Columns in your query section by using the ‘>’ button.
6. Click Next and proceed to the Next step, and then specify any additional options such as sorting
etc.
7. That’s it, now choose how you would like to display the data of the Microsoft Access Database in
your Excel sheet, as a Table, PivotTable Report, or PivotChart and PivotTable Report.
Version 5 – 7/17/2012
http://www.csus.edu/irt/fsrc
29
IRT Faculty Staff Resource Center
Managing Data – Participant’s Handbook
8. Click OK and you will find the data imported to your Excel sheet.
Version 5 – 7/17/2012
http://www.csus.edu/irt/fsrc
30
IRT Faculty Staff Resource Center
Managing Data – Participant’s Handbook
FACULTY STAFF RESOURCE CENTER
WHAT IS THE FACULTY STAFF RESOURCE CENTER?
The Faculty Staff Resource Center (FSRC) is a division within the IRT Department that offers one-on-one
computer support and training to faculty and staff.
MISSION
The mission of the Faculty Staff Resource Center is to support faculty in the creation of accessible course
materials and eLearning content, teach faculty and staff how to use technology, and develop the
professional skills of our student staff.
Additional services include:
 Assistance with creation of Accessible Instructional Materials
 eLearning Materials Support and Consultation
 Technology Training Workshops offered by ATCS and IRT
 Assistance with Captioning Self-Service and Media Projects
 General software/equipment/services support provided by FSRC Student Staff
Hours and contact information
Mon-Thu:
9:00am-4:00pm
Fri:
10:00-3:00pm
Phone:
Email:
Web:
Location:
Version 5 – 7/17/2012
916.278.6112
fsrc@csus.edu
http://www.csus.edu/irt/fsrc
AIRC 3012
http://www.csus.edu/irt/fsrc
31
Download