You are on page 1of 4

10/1/2011

Chapter 2: Working with Data

Apakah PCA?
DATA ENTRY

One of the many uses of Excel is to facilitate data

entry. Error-free data entry is essential to accurate data analysis. Excel provides several methods for entering your data. Data sets can be entered manually from the key board or retrieved from a text file, database, or online Web sources. You can also have Excel automatically enter patterns of data for you, saving you the trouble of creating these data values yourself. Youll study all of these techniques in this course, but first youll entering data from the keyboard.

Apakah PCA?
ENTERING DATA FROM THE KEYBOARD

Apakah PCA?
STEP TO ENTERING DATA SET IN EXCEL oxygen

Table

2.1 displays monthly average DO (mg/L) concentration observed for each month in year 2005 at Langat River. There are three column in this data set: Station, concentration of DO in January and August. The station column contains an station number for each of the twelve stations. The DO column displays the DO concentration observed for each stations in month of January and August 2005.

Table 1: Dissolved concentration. Station 1 2 3 4 5 6 7 8 9 10 11 12

1. 2.

DO (mg/L) January August 7.5 5.5 8.0 7.6 7.0 6.7 6.7 7.1 6.9 4.5 7.1 6.0 8.0 5.3 6.2 4.7 6.5 5.1 7.3 5.3 7.9 5.9 7.2 6.0

3. 4.

5.

Launch Excel 2003 with double clicks at Excel 2003/07 icon. Click cell A1 to make it the active cell. Drag cursor from cell A1:A2. Merge and Center . Type Station and then press Tab. Drag cursor from cell B1 to cell C1. Click Merge and Center . Type DO (mg/L). Type January in cell B2 and August in cell C2.

Figure 1: The first two rows of the DO concentration station data set.

Apakah PCA?
ENTERING DATA WITH AUTOFILL

Apakah PCA?
STEP TO USE AUTOFILL IN EXCEL
1.

If youre inserting a column or row of values that follow some

sequential pattern, you can save yourself time by using Excels Autofill feature. The Autofill feature allows you to fill up a range of values with a series of numbers or dates. You can use Autofill to generate automatically columns containing data values such as: 1, 2, 3,4,.,8,10 Jan, Feb, Mar, ., Nov, Dec
In the DO station data, we have a sequence of numbers, 1-12,

2.

3.

that represent water quality monitoring stations. opportunity to use the Autofill feature.

We could enter the values by hand, but this is also an

4.

Select the range A3:A4. Figure 2: Using Autofill to Notice the small black box at the lower insert a sequence of data right corner of the double border around the selected range. This is called a fill values. handle. To create a simple sequence of numbers, youll drag this fill handle over a selected range cells. Move the mouse pointer over the fill handle until the pointer changes from a to a Click and hold down the mouse button. Drag the fill handle down to cell A10 and release the mouse button. Note that as you drag the fill handle down, a screen is displayed showing the value that will be placed in the active cell if you release the mouse button at that point. Figure 2.2 shows the DO concentration station numbers placed in the cell A3:A14

1
You created this PDF from an application that is not licensed to print to novaPDF printer (http://www.novapdf.com)

10/1/2011

Apakah PCA?
STEP TO USE AUTOFILL IN EXCEL Figure 2: Using Autofill to insert a sequence of data values. Figure 3: The completed DO concentration station data.

Apakah PCA?
INSERTING NEW DATA

Sometimes we want to add new data to our data set.

For example, we discover that there is a tenth DO station with the following sales data:
Station January 0 7.1 August 6.3

Apakah PCA?
STEP TO INSERT NEW DATA INTO A WORKSHEET

Apakah PCA?
DATA FORMATS
Now that weve entered your first data

Select the cell range A3:C3. 2. Right click the selected range and then click Insert from the pop-up menu. See Figure 2.4.
1.

Figure 2.4: Running the Insert command from the shortcut menu.

1. 2. 3. 4.

set, were ready to work with data formats. Data formats are the fonts and styles that Excel applies to your datas appearance. To apply a boldface font and center the column titles: Select the range A1:C1. Click the bold button from the Font group on the Home tab. Click the Center button from the Alignment group on the Home tab. Click cell A1 to remove the selection. Your data set should look like Figure 2.5.

Figure 2.5: Applying a boldface font and centering the column titles.

Apakah PCA?
INSERTING AN EXCEL FUNCTION
A function is composed of the

Apakah PCA?
INSERTING AN EXCEL FUNCTION Figure 2.6: Accessing Math & Trig functions.

function name and a list of arguments- values required by the function. For example to calculate the sum of a set of cells, you would use the SUM function. The general form or syntax of the SUM function is = SUM(B3:B15)

To calculate total sales figures for all ten service stations: 1. Type Total in cell A16 and press Tab. 2. Click the Math & Trig button located in the Function Library group on the Formulas tab. 3. Scroll down the scroll box and click SUM from the list as shown in Figure 2.6. 4. Click the Collapse Dialog button next to the number1 argument. 5. Drag our mouse pointer over the range B3:B15. 6. Click the Restore Dialog button 7. Click OK.

Figure 2.7: Adding arguments to the SUM function.

2
You created this PDF from an application that is not licensed to print to novaPDF printer (http://www.novapdf.com)

10/1/2011

Apakah PCA?
SORTING DATA

Apakah PCA?
TO SORT THE DATA BY TOTAL AMOUNT
1.

Once youve entered your data into Excel, youre

ready to start analyzing it. One of the simplest analyses is to determine the range of the data values. Which values are largest? To answer question of this type, you can use Excel to sort the data. For example, you can sort the gas DO station data in descending order, displaying first the station that has shown the greatest total DO concentration down through the station that has had the lowest DO.

2.

3.

Select the cell range A1:D11. The range A1:D11 contains the range you want to sort. Note that you do not include the cells in the range A13:D13, because these are the column totals and not individual service stations. Click the Sort & Filter button located in the Editing group on the Home tab and then click Custom Sort. Excel opens the Sort dialog box. From this dialog box you can select multiple sorting levels. You can sort each level in an ascending or descending order. Click the Sort by list box and select Total from the list range names found in the selected worksheet cells.

Figure 2.8: The Sort & Filter menu.

Figure 2.9: The Sort dialog box.

Apakah PCA?
4.

Apakah PCA?
USING THE AUTOFILTER

5. 6.

Click Largest to Smallest from the Order list box and shown in Figure 2-14. Click the OK button. Deselect the cell range by clicking cell A1. The stations are now sorted in order from Station

Figure 2.10: The DO station data sorted in descending order to Total (cumlative) DO concentration.

Lets say the water quality station shows abrupt

changes in DO concentration because of sudden change in weather condition, you need to know which station given the DO values below the Interim National Water Quality Standard (INWQS-Class IIB). You can construct a simple query using comparison criteria to have Excel display only stations with DO concentration <5.0 mg/L.

Apakah PCA?
TO QUERRY THE WATER QUALITY STATION LIST 1.

Apakah PCA?
TO QUERRY THE WATER QUALITY STATION LIST

2.

3. 4.

Click the Sort & Filter button from the Editing group on the Home tab and then click Filter from the drop-down menu. Click the DO drop-down arrow to display the shortcut menu. Click Number Filters and then Less Than in Figure 2.12. Type 5.0 in the input box as shown in Figure 2.12. Click OK.

Figure 2.11: Filtering data values. Figure 2.12: Creating a filter for DO concentration less than 5 mg/L. Figure 2.13: Water quality station with DO concentration <5.0 mg/L.

3
You created this PDF from an application that is not licensed to print to novaPDF printer (http://www.novapdf.com)

10/1/2011

Apakah PCA?
IMPORTING DATA FROM TEXT FILES

Apakah PCA?
IMPORTING THE DATA FROM TEXT FILE INTO AN EXCEL WORKBOOK

Often your data will be created using applications other

1. 2.

than Excel. In that case, youll want to go through a process of bringing that data into Excel called importing. Excel provides many tools for importing data. In this course youll explore two of the more common sources of external data: text files and databases. A text file contains only text and numbers, without any of the formulas, graphics, special fonts, or formatted text that you would find in a workbook. Text files are one of the simplest and most widely used methods of storing data, and most software programs can both save and retrieve data in a text file format.

3.

Click the Office button and then click Open. Navigate to the data folder and change the file type to Text Files (*.pm; *.txt; *.csv). Double-click the Data Sg Klang.txt file.

Figure 2.14: Text Import Wizard Step 1 of 3.

The wizard has automatically determined that the Data Sg Klang.txt file is organized as a fixed-width text file. By moving the horizontal and vertical scroll bars, you can see the whole data set. Once youve started the Text Import Wizard, you can define where various data columns begin and end. You can also have the wizard skip entire columns.

Apakah PCA?
IMPORTING THE DATA FROM TEXT FILE INTO AN EXCEL WORKBOOK

To define the columns

you intend to import: 1. Click the Next button. 2. Select Treat Consecutive delimiters as one and click Next twice than click Finish.

Figure 2.15: Text Import Wizard Step 2 of 3.

TERIMA KASIH
THANK YOU

4
You created this PDF from an application that is not licensed to print to novaPDF printer (http://www.novapdf.com)

You might also like