aplikasi MS Excel - Suyatno, Ir., MKes

advertisement
Manajemen Data S2 Gizi UNDIP
MODUL: APLIKASI MICROSOFT EXCEL
Oleh: Ir. Suyatno, MKes
Microsoft Excel adalah aplikasi yang dapat digunakan untuk memasukkan data,
menghitung, mengolah data dan menampilkan dalam bentuk grafik. Aplikasi lembar
kerja tersebut dilengkapi pula dengan fasilitas formula (rumus) dan makro yang dapat
kita atur untuk menghitung secara otomatis dan kontinyu. Dengan kemampuan yang
demikian, menjadikan Microsoft Excel banyak dipakai berkaitan dengan perhitungan,
keuangan dan statistik. Meskipun aplikasi Excel hampir sama dengan Lotus 123 yang
sudah populer, namun penggunaan Excel akan lebih mempermudah pemakainya apabila
dia menggunakan multi tasking dengan aplikasi MS-Office yang lain.
Data yang dimasukkan dan diolah menggunakan Excel dapat dicopy atau diekspor
untuk aplikasi yang lain, misalnya: untuk ditampilkan dalam MS-Word, SPSS, Dbase
atau yang lain. Terkait dengan kegiatan penelitian, Excel sering digunakan untuk
kepentingan entry data dan pengolahan data, sebelum kemudian dianalisis lebih lanjut
dengan Software SPSS atau yang lain.
Membuka dan Menutup Program:
Seperti program aplikasi yang lain, untuk memulai MS-Excel dilakukan dengan cara:
- Pilih menu Start, pilih menu Programs
- Dari menu Programs, pilih MS-Excel dan kemudian di Klik.
Sedangkan untuk menutup MS-Excel dengan cara : Klik File dan pilih Exit, atau Klik
icon close pada pojok kanan atas.
Kotak Formula
Sel kerja
Scroll bar
Sheet aktif
Lefttist dan Risgtist:
Untuk menggunakan MS Excel secara optimal, bisa digunakan tombol kiri (left)
mouse atau tombol kanan mouse (right). Tombol kanan mouse digunakan untuk
melakukan jalan pintas terhadap perintah yang akan kita gunakan. Caranya:
- letakkan pointer dalam sembarang obyek yang dikehendaki
- klik tombil kanan mouse dan pilih perintah yang dikehendaki.
2
Membuat dokumen baru:
1. Pada menu File klik New
2. Pada dokumen baru, workbook (buku kerja/sheet) akan kosong
3. Pilih Sheet yang dikehendaki dengan cara melakukan klik pada bagian sheet1,
sheet2, sheet3, dst
4. Selanjutnya anda bisa bekerja pada sheet yang telah dibuka.
Nama sheet bisa dirubah dengan cara melakukan klik 2 kali pada sheet yang dikehendaki
dan tulis nama yang dipilih. Atau sheet bisa dihapus dengan cara memilih menu Edit –
delate sheet.
Membuka dokumen:
1. Klik file – Open
2. Dalam kotak Look in, pilih drive tempat dokumen berada
3. Dalam bingkai Look in akan munculo daftar folder dan file, pilih folder yang
memuat dokumen yang dicari. Teruskan dengan mengetik subfolder sampai
menemukan subfolder yang memuat dokumen yang dicari
4. Setelah menemukan foldernya, klik nama file folder tersebut
5. Pilih Open
Untuk membuka dokumen yang dibuat dengan aplikasi lain, maka klik format yang
digunakan dalam dokumen tersebut pada pilihan: Files of type, klik nama dokumen
dalam daftar folder dan file. Atau bisa juga dengan langsung menuliskan nama file
dan ekstensinya pada kotak: File.
Menyimpan dokumen:
1. Klik file –Save atau tekan CTRL – S
2. Bila kita ingin menggandakan dokumen aktif yang sedang dibuat maka pilih: File
– Save As, kemudian simpan file dengan nama atau letak folder berbeda
3. Kita juga bisa menyimpan dokumen MS Exel dalm format File lain dengan
merubah ekstention sesuai yang dikehendaki pada: Files of type
Memasukkan Data:
MS. Excel merupakan aplikasi berbasis Sel, dimanapun pointer berada selali dapat dilihat
melalui nomor kolom dan baris
Untuk memasukkan data kita tinggal mengisi angka atau karakter pada sel yang sedang
aktif (ditunjuk garis sel yang tampak lebih tebal).
Pindah dari satu sel ke sel lain dapat dilakukan dengan :
- Menekan tombol panah ke kiri/kanan/bawah
- Menekan tombol tabs
- Menekan enter
Seleruh sel secara otomatis akan rata kiri di dalam sel, tetapi kita bisa mengaturnya
dengan menggunakan Cells pada menu Format (atau menggunakan mouse kanan)
Mengedit Sel:
1. Lakukan boble klik pada sel yang memuat data yang akan diedit
2. Lakukan editing pada sel tersebut, jika sudah selesai tekan ENTER
3. Untuk menggagalkan perintah tersebut, tekan Esc
3
Mengkopi atau Memindah Karakter:
1. Fungsi editing MS Excel dama dengan MS-Word, bisa menggunakan menu Edit
kemudian pilih copy atau cut dikombinasikan dengan paste. Atau bisa melalui icon
yang ada.
2. Jika kita akan mengkopy/memindah data dalam sel maka Doble klik pada sel yang
memuat data yang akan dipndahkan, kemudian pilih data yang akan
dipindahkan/dikopi dengan menggunakan perintah Cut atau Copy yang sama persis
dengan MS-Word
Membuat Formula:
Formula (rumus) digunakan untuk membuat perhitungan atau kalkulasi data. Membuat
formula cukup memulai dengan tanda sama dengan (=) kemudian diikuti dengan
perintah formulasi.
Contoh sederhana:
=C3+C4 (tanda + untuk penambahan)
=C3/C4 (tanda / untuk pembagian)
=C3-C4 (tanda – untuk pengurangan)
=C3*C4 (tanda * untuk perkalian)
Untuk melakukan kalkulasi bertingkat perlu digunakan tanda kurung, sehingga kita bisa
menghitung dengan menggunakan data dari sel atau kelopok sel
Untuk perhitungan secara otomatis maka dapat dilakukan dengan: menggunakan
perintah Autosum atau klik: fx = insert function dan pilih fungsi yang dikehendaki.
Melakukan pemformatan:
- Format Tabel:
Pilih perintah autoformat pada menu Format untuk mengatur tabel secara otomatis,
tetapi jangan lupa terlebih dahulu memilih sel yang diinginkan (mem-block)
- Format Sel:
Pilih menu Format – Sel, pilih macam pola format yang ingin mulai dari warna,
jenis huruf, perataan dan sebagainya. Bisa juga Anda melakukan dengan Klik kanan
mouse.
Entry Data dengan Program Excel:
Entry data dengan menggunakan Excel merupakan pilihan yang banyak dilakukan para
peneliti, sebab relatif mudah dan praktis.
Selain itu data yang telah dientry dengan menggunakan MS-Excel dapat dengan mudah
disimpan atau dibuka dengan aplikasi program lainnya seperti dengan Dbase atau SPSS.
Beberapa hal yang perlu diperhatikan dalam kegiatan Entry Data Penelitian dengan
program MS-Excel adalah:
1. Nama variabel harus diletakkan pada baris pertama agar bisa terbaca sebagai
nama variabel apabila dibuka dengan program aplikasi lain. Nama variabel
diletakkan dibagian paling atas pada tiap kolom, satu kolom satu variabel
2. Data dimasukkan sesuai dengan nama variabel (kolom) kolom pada baris kedua
dan seterusnya sampai dengan jumlah record (sampel) selesai dientry
4
Insert Function:
1. SUM
Adds all the numbers in a range of cells.
Syntax
SUM(number1,number2, ...)
Number1, number2, ... are 1 to 30 arguments for which you want the total value
or sum.
Remarks

Numbers, logical values, and text representations of numbers that you type
directly into the list of arguments are counted. See the first and second examples
following.

If an argument is an array or reference, only numbers in that array or reference are
counted. Empty cells, logical values, text, or error values in the array or reference
are ignored. See the third example following.

Arguments that are error values or text that cannot be translated into numbers
cause errors.
Example
The example may be easier to understand if you copy it to a blank worksheet.
1.
2.
3.
4.
5.
Create a blank workbook or worksheet.
Select the example in the Help topic. Do not select the row or column headers.
Press CTRL+C.
In the worksheet, select cell A1, and press CTRL+V.
To switch between viewing the results and viewing the formulas that return the
results, press CTRL+` (grave accent), or on the Tools menu, point to Formula
Auditing, and then click Formula Auditing Mode.
Data
-5
15
30
'5
TRUE
5
Formula
Description (Result)
=SUM(3, 2)
Adds 3 and 2 (5)
=SUM("5", 15,
TRUE)
Adds 5, 15 and 1, because the text values are translated into
numbers, and the logical value TRUE is translated into the
number 1 (21)
=SUM(A2:A4)
Adds the first three numbers in the column above (40)
=SUM(A2:A4, 15)
Adds the first three numbers in the column above, and 15 (55)
=SUM(A5,A6, 2)
Adds the values in the last two rows above, and 2. Because
nonnumeric values in references are not translated, the values in
the column above are ignored (2)
2. AVERAGE
Returns the average (arithmetic mean) of the arguments.
Syntax
AVERAGE(number1,number2,...)
Number1, number2, ... are 1 to 30 numeric arguments for which you want the
average.
Remarks

The arguments must either be numbers or be names, arrays, or references that
contain numbers.

If an array or reference argument contains text, logical values, or empty cells,
those values are ignored; however, cells with the value zero are included.
Tip
When averaging cells, keep in mind the difference between empty cells and those
containing the value zero, especially if you have cleared the Zero values check box on
the View tab (Options command, Tools menu). Empty cells are not counted, but zero
values are.
Example
The example may be easier to understand if you copy it to a blank worksheet.
1. Create a blank workbook or worksheet.
2. Select the example in the Help topic. Do not select the row or column headers.
3. Press CTRL+C.
4. In the worksheet, select cell A1, and press CTRL+V.
5. To switch between viewing the results and viewing the formulas that return the
results, press CTRL+` (grave accent), or on the Tools menu, point to Formula
Auditing, and then click Formula Auditing Mode.
6
Data
10
7
9
27
2
Formula
Description (Result)
=AVERAGE(A2:A6)
Average of the numbers above (11)
=AVERAGE(A2:A6, 5)
Average of the numbers above and 5 (10)
3. STDEV
Estimates standard deviation based on a sample. The standard deviation is a measure of
how widely values are dispersed from the average value (the mean).
Syntax
STDEV(number1,number2,...)
Number1, number2, ... are 1 to 30 number arguments corresponding to a sample
of a population. You can also use a single array or a reference to an array instead
of arguments separated by commas.
Remarks

STDEV assumes that its arguments are a sample of the population. If your data
represents the entire population, then compute the standard deviation using
STDEVP.

The standard deviation is calculated using the "nonbiased" or "n-1" method.

Logical values such as TRUE and FALSE and text are ignored. If logical values
and text must not be ignored, use the STDEVA worksheet function.
Example
Suppose 10 tools stamped from the same machine during a production run are collected
as a random sample and measured for breaking strength.
The example may be easier to understand if you copy it to a blank worksheet.
1. Create a blank workbook or worksheet.
2. Select the example in the Help topic. Do not select the row or column headers.
3. Press CTRL+C.
4. In the worksheet, select cell A1, and press CTRL+V.
7
5. To switch between viewing the results and viewing the formulas that return the
results, press CTRL+` (grave accent), or on the Tools menu, point to Formula
Auditing, and then click Formula Auditing Mode.
Strength
1345
1301
1368
1322
1310
1370
1318
1350
1303
1299
Formula
Description (Result)
=STDEV(A2:A11)
Standard deviation of breaking strength (27.46391572)
4. IF
Returns one value if a condition you specify evaluates to TRUE and another value if it
evaluates to FALSE.
Use IF to conduct conditional tests on values and formulas.
Syntax
IF(logical_test,value_if_true,value_if_false)
Logical_test is any value or expression that can be evaluated to TRUE or
FALSE. For example, A10=100 is a logical expression; if the value in cell A10 is
equal to 100, the expression evaluates to TRUE. Otherwise, the expression
evaluates to FALSE. This argument can use any comparison calculation operator.
Value_if_true is the value that is returned if logical_test is TRUE. For example,
if this argument is the text string "Within budget" and the logical_test argument
evaluates to TRUE, then the IF function displays the text "Within budget". If
logical_test is TRUE and value_if_true is blank, this argument returns 0 (zero).
To display the word TRUE, use the logical value TRUE for this argument.
Value_if_true can be another formula.
8
Value_if_false is the value that is returned if logical_test is FALSE. For
example, if this argument is the text string "Over budget" and the logical_test
argument evaluates to FALSE, then the IF function displays the text "Over
budget". If logical_test is FALSE and value_if_false is omitted, (that is, after
value_if_true, there is no comma), then the logical value FALSE is returned. If
logical_test is FALSE and value_if_false is blank (that is, after value_if_true,
there is a comma followed by the closing parenthesis), then the value 0 (zero) is
returned. Value_if_false can be another formula.
Remarks

Up to seven IF functions can be nested as value_if_true and value_if_false
arguments to construct more elaborate tests. See the last of the following
examples.

When the value_if_true and value_if_false arguments are evaluated, IF returns the
value returned by those statements.

If any of the arguments to IF are arrays, every element of the array is evaluated
when the IF statement is carried out.

Microsoft Excel provides additional functions that can be used to analyze your
data based on a condition. For example, to count the number of occurrences of a
string of text or a number within a range of cells, use the COUNTIF worksheet
function. To calculate a sum based on a string of text or a number within a range,
use the SUMIF worksheet function. Learn about calculating a value based on a
condition.
Example 1
The example may be easier to understand if you copy it to a blank worksheet.
1. Create a blank workbook or worksheet.
2. Select the example in the Help topic. Do not select the row or column headers.
3. Press CTRL+C.
4. In the worksheet, select cell A1, and press CTRL+V.
5. To switch between viewing the results and viewing the formulas that return the
results, press CTRL+` (grave accent), or on the Tools menu, point to Formula
Auditing, and then click Formula Auditing Mode.
Data
50
Formula
Description (Result)
=IF(A2<=100,"Within
budget","Over budget")
If the number above is less than or equal to 100,
then the formula displays "Within budget".
Otherwise, the function displays "Over budget"
(Within budget)
=IF(A2=100,SUM(B5:B15),"")
If the number above is 100, then the range
9
B5:B15 is calculated. Otherwise, empty text ("")
is returned ()
Example 2
The example may be easier to understand if you copy it to a blank worksheet.
1. Create a blank workbook or worksheet.
2. Select the example in the Help topic. Do not select the row or column headers.
3. Press CTRL+C.
4. In the worksheet, select cell A1, and press CTRL+V.
5. To switch between viewing the results and viewing the formulas that return the
results, press CTRL+` (grave accent), or on the Tools menu, point to Formula
Auditing, and then click Formula Auditing Mode.
A
B
Actual Expenses
Predicted Expenses
1500
900
500
900
500
925
Formula
Description (Result)
=IF(A2>B2,"Over
Budget","OK")
Checks whether the first row is over budget (Over
Budget)
=IF(A3>B3,"Over
Budget","OK")
Checks whether the second row is over budget (OK)
Example 3
The example may be easier to understand if you copy it to a blank worksheet.
1. Create a blank workbook or worksheet.
2. Select the example in the Help topic. Do not select the row or column headers.
3. Press CTRL+C.
4. In the worksheet, select cell A1, and press CTRL+V.
5. To switch between viewing the results and viewing the formulas that return the
results, press CTRL+` (grave accent), or on the Tools menu, point to Formula
Auditing, and then click Formula Auditing Mode.
Score
45
90
10
78
Formula
Description (Result)
=IF(A2>89,"A",IF(A2>79,"B",
IF(A2>69,"C",IF(A2>59,"D","F"))))
Assigns a letter grade to the
first score (F)
=IF(A3>89,"A",IF(A3>79,"B",
IF(A3>69,"C",IF(A3>59,"D","F"))))
Assigns a letter grade to the
second score (A)
=IF(A4>89,"A",IF(A4>79,"B",
IF(A4>69,"C",IF(A4>59,"D","F"))))
Assigns a letter grade to the
third score (C)
In the preceding example, the second IF statement is also the value_if_false argument to
the first IF statement. Similarly, the third IF statement is the value_if_false argument to
the second IF statement. For example, if the first logical_test (Average>89) is TRUE, "A"
is returned. If the first logical_test is FALSE, the second IF statement is evaluated, and so
on.
The letter grades are assigned to numbers using the following key.
If Score is
Then return
Greater than 89
A
From 80 to 89
B
From 70 to 79
C
From 60 to 69
D
Less than 60
F
5. SUMIF
Adds the cells specified by a given criteria.
Syntax
SUMIF(range,criteria,sum_range)
Range is the range of cells you want evaluated.
Criteria is the criteria in the form of a number, expression, or text that defines
which cells will be added. For example, criteria can be expressed as 32, "32",
">32", "apples".
Sum_range are the actual cells to sum.
Remarks

The cells in sum_range are summed only if their corresponding cells in range
match the criteria.
11

If sum_range is omitted, the cells in range are summed.

Microsoft Excel provides additional functions that can be used to analyze your
data based on a condition. For example, to count the number of occurrences of a
string of text or a number within a range of cells, use the COUNTIF function. To
have a formula return one of two values based on a condition, such as a sales
bonus based on a specified sales amount, use the IF function.
Example
The example may be easier to understand if you copy it to a blank worksheet.
1. Create a blank workbook or worksheet.
2. Select the example in the Help topic. Do not select the row or column headers.
3. Press CTRL+C.
4. In the worksheet, select cell A1, and press CTRL+V.
5. To switch between viewing the results and viewing the formulas that return the
results, press CTRL+` (grave accent), or on the Tools menu, point to Formula
Auditing, and then click Formula Auditing Mode.
A
B
Property Value
Commission
100,000
7,000
200,000
14,000
300,000
21,000
400,000
28,000
Formula
Description (Result)
=SUMIF(A2:A5,">160000",B2:B5)
Sum of the commissions for property values
over 160000 (63,000)
12
Latihan 1: Menghitung BMI
1. Aktifkan program Microsoft Excel.
2. Masukkan data hasil pengukuran penelitian berikut:
No
Resp
1
2
3
4
5
6
7
8
9
10
11
12
Berat
(kg)
60
65
55
58
50
60
64
68
70
58
67
70
Tinggi
(cm)
170
165
160
158
155
160
165
150
155
170
150
160
BMI
status
3. Hitunglah nilai BMI dengan menggunakan formula.
4. Hitunglah status dengan menggunakan fungsi ”If” berdasarkan patokan berikut:
BMI < 18,5
: kurus
18,5 < BMI< 25 : normal
BMI > 25
: gemuk
Latihan 2: Menghitung Konsumsi Gizi
1. Aktifkan program Microsoft Excel.
2. Masukkan data hasil pengukuran penelitian berikut:
No
Resp
1
1
1
1
1
1
2
2
2
2
2
Nama Makanan
Nasi
Telur ayam ras
Minyak goreng
Gula
Pisang goreng
wortel
Nasi
Ayam goreng
Pepaya
Telu bebek asin
Kacang panjang
Berat
(gram)
350
70
10
20
75
50
300
100
80
70
50
Kandungan
Energi
DKBM
366
154
909
364
132
36
366
302
46
193
30
Bdd
100
89
100
100
100
80
100
58
100
83
100
Intake
Energi
13
3. Hitunglah intake energi yang berasal dari masing-masing bahan makanan (dengan
menggunakan formulasi)
4. Hitunglah total konsumsi energi dari tiap responden (dengan menggunakan
formulasi)
Latihan 3: Menghitung Standarisasi Pengukur Tinggi Badan
(Menghitung nilai Presisi dan Akurasi Pengukuran)
1.
2.
Aktifkan program Microsoft Excel.
Masukkan data hasil pengukuran supervisor, dan 2 orang peserta pelatihan mengukur
tinggi badan, seperti tersaji pada tabel berikut:
Nomor
Anak
1
2
3
4
5
6
7
8
9
10
3.
Hasil Pengukuran
Supervisor
(a)
(b)
82.8
82.2
83.8
84.6
86.0
85.6
86.2
86.0
82.0
82.0
85.6
85.4
82.3
82.4
87.6
87.6
80.1
80.6
85.3
86.5
Hasil Pengukuran
Peserta 1
(a)
(b)
84.2
83.7
86.1
85.4
86.2
85.8
87.5
86.5
82.6
82.7
86.4
86.0
82.0
83.5
88.4
88.2
82.0
81.5
86.6
87.0
Hasil Pengukuran
Peserta 2
(a)
(b)
83.0
83.7
85.0
85.4
85.0
85.8
86.0
86.5
82.5
82.7
85.5
86.0
83.0
83.5
87.0
88.2
81.0
81.5
86.0
87.0
Lakukan perhitungan uji standarisasi dengan mengisi kolom sebagai berikut dengan
menggunakan rumus:
Supervisor :
No
Anak
1
2
3
4
5
6
7
8
9
10
Hasil Peserta
1
(a)
(b)
82.8 82.2
83.8 84.6
86.0 85.6
86.2 86.0
82.0 82.0
85.6 85.4
82.3 82.4
87.6 87.6
80.1 80.6
85.3 86.5
Jumlah
d
(a-b)
d2
14
Peserta 1 :
No
Anak
Hasil Peserta
1
(a)
(b)
1
2
3
4
5
6
7
8
9
10
84.2 83.7
86.1 85.4
86.2 85.8
87.5 86.5
82.6 82.7
86.4 86.0
82.0 83.5
88.4 88.2
82.0 81.5
86.6 87.0
Jumlah
d
(a-b)
d2
Tanda
Jumlah
Jumlah (S)
D
(+ / -) pengukuran Pengukuran (s-S)
Peserta
Supervisor
s=(a+b)
S=(a+b)
D2
Tanda
2
(s-S) (+ / -)
--------------------------------------------------
-------
Tanda
Jumlah
Jumlah (S)
D
(+ / -) pengukuran Pengukuran (s-S)
Peserta
Supervisor
s=(a+b)
S=(a+b)
D2
Tanda
(s-S)2 (+ / -)
--------------------------------------------------
-------
Peserta 2 :
No
Anak
Hasil Peserta
2
(a)
(b)
1
2
3
4
5
6
7
8
9
10
83.0 83.7
85.0 85.4
85.0 85.8
86.0 86.5
82.5 82.7
85.5 86.0
83.0 83.5
87.0 88.2
81.0 81.5
86.0 87.0
Jumlah
d
(a-b)
d2
4. Simpulkan hasil perhitungan uji standarisasi dengan ketentuan sebagai berikut:
(1) Presisi :
- ∑ds2 dari supervisor biasanya merupakan yang terkecil dari semua
pengukuran karena keahliannya dalam melakukan pengukurannya.
- Presisi Baik jika: ∑ds2 dari peserta < (2 x ∑ds2 dari supervisor)
Presisi Cukup jika : ∑ds2 dari peserta > (2 x ∑ds2 dari supervisor) dan
< (3 x ∑ds2 dari supervisor)
15
Presisi kurang jika : ∑ds2 dari peserta > (3x ∑ds2 dari supervisor)
(2) Akurasi:
- Akurasi Baik jika: ∑Ds2 dari peserta < (2 x ∑ds2 dari supervisor)
Akurasi kurang jika : ∑Ds2 dari peserta > (2 x ∑ds2 dari supervisor)
- ∑Ds2 dari peserta harus lebih besar dari ∑ds2 dari peserta, jika tidak berarti
telah salah hitung
- Berdasarkan tanda (+) pada D, maka:
o Bila tanda + lebih dari separuh maka pengukur cenderung mengukur
selalu lebih besar
o Bila tanda + lebih kecil dari separuh maka pengukur cenderung mengukur
lebih kecil
o Bila tanda (+) dan tanda (-) jumlahnya sama, maka pengukur cendering
melakukan kesalahan mengukur lebih besar sama dengan kesalahan
mengkur lebih kecil.
Download