Blog XQ
http://excelquotient.wordpress.com
Blog XQ (http://excelquotient.wordpress.com)
Blog XQ (http://excelquotient.wordpress.com)
Agenda
Blog XQ (http://excelquotient.wordpress.com)
Help?
Buku
Internet seperti dari Blog XQ (http://excelquotient.wordpress.com ) atau mailing
list xl-mania@yahoogroups.com.
Training/Workshop
Programming Logic
Mampu menggunakan Excel untuk entri data sederhana
Mampu menggunakan formula di Excel
Mengetahui shortcuts keyboard untuk perpindahan cell dalam worksheets
Blog XQ (http://excelquotient.wordpress.com)
Record Macro:
Tools>Macro>Security
Running Macro:
Tools>Macro>Macro
[Alt+F8]
Blog XQ (http://excelquotient.wordpress.com)
Blog XQ (http://excelquotient.wordpress.com)
Record Macro
Record Macro
Jika lupa
Jika ingin tahu kode sumber dari apa yang
dikerjakan dengan GUI Excel
Caranya:
Blog XQ (http://excelquotient.wordpress.com)
Declaration
Blog XQ (http://excelquotient.wordpress.com)
Contoh:
Public nama As String
Function kurangkan(angka1 As Integer, angka2 As Integer)
Dim hasil As Integer
kurangkan = angka2 - angka1
End Function
Sub tambahdankurang()
Dim nilai1 As Integer
Dim nilai2 As Integer
Dim nilai3 As Integer
Dim nilai4 As Integer
nilai1
nilai2
nilai3
nilai4
=
=
=
=
1982
9128
nilai1 + nilai2
kurangkan(nilai1, nilai2)
nama = "F-Xtudent"
namanya
End Sub
Sub namanya()
namamu = nama
End Sub
Blog XQ (http://excelquotient.wordpress.com)
Range/Cells
Range/Cells
Storing Value:
Range(A1:A3).Copy Range(B1)
Insert Column:
Selection.EntireRow.Insert
Font Manipulation:
Activecell.Font.
Name; Size
ColorIndex=(0-56);
Color=RGB(0-255, 0-255, 0-255)
Bold; Italic; Underline
(Boolean[True/False])
Paste Range:
Range(A1).Select
Range(A1:D5).Select
Range(Sel,SelName).Select
SelName=Range(E4).Address
SelName=Range(A1:E4).Address
Activate Range:
Sel=Activecell.Value
Range(A1).Value=Statistika
Range(A2).Value=12
SelectionPasteSpecial Paste:=xlValues, _
Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Clear Range:
Range(A1:A3).Clear
Etc
10
Blog XQ (http://excelquotient.wordpress.com)
Worksheet/Sheets
Worksheets/Sheets
WorkSheets(Grafik).Activate
Move Sheet:
Sheets(Grafik).Delete
Activate Sheet:
Worksheets(Sheet1).Name=Grafik
Delete Sheet:
Worksheets.Add After:=ActiveSheet
ActiveSheet.Move Before:=Sheets(Grafik)
Etc
11
Blog XQ (http://excelquotient.wordpress.com)
Workbooks/Books
Workbooks/Books
Open Workbook:
Lokasi=ActiveWorkbook.Path
ActiveWorkbook.Close
ActiveWorkbook.Save
ActiveWorkbook.SaveCopyAs Filename:=C:\Data2.xls
Close Workbook:
Worknooks(Data).Activate
Save Workbook:
Workbooks.Open C:\Data.xls
Activate Workbook:
Set Newbook=Workbooks.Add
Newbook.Name=myData
Nilai=Workbooks(Data).Worksheets(Grafik).Range(A1:D5).Value
Etc
12
Blog XQ (http://excelquotient.wordpress.com)
Application
Application
Application.Wait(Now+TimeValue(00:00:01))
Statust Bar:
Application.DisplayAlerts=False
Suspending Execution:
Application.ScreenUpdating=False
Application.Statusbar=Running
Etc
13
Blog XQ (http://excelquotient.wordpress.com)
Charts/Chart
Charts/Chart
BarChart
600
500
400
300
200
100
0
Ch
Excess Demand
Seimbang
Tekanan Jual
Char
arts
ts.A
.Add
dd
Ac
Deletert
Activ
tiveC
eCha
haChart:
rt.C
.Cha
hartrtTy
Type
pe==xlxlCCol
olum
umnC
nClu
lust
ster
ered
ed
Ac
tiv
eC
The other
types
of chart
could be learned use Record Macro command
rt
.S
et
ActiveCha
So
ce
DDat
hart.SetSour
a
So
ur
ce
ur
:=
ce
Sh
ata Source:=Shee
PlPlot
eets
ts("("Sh
Shee
eet1
t1")").R
otBy
By:=
.Ran
:=__
ange
ge("("A1
A1:B
:B5"
5"),),
xlxlCCol
olum
umns
ns
Ac
tiv
ActiveC
eCha
hartrt.L
.Loc
ocat
atio
ionnW
Whe
here
re:=
:=xlxlLo
Loca
catio
tionA
nAsO
sObj
Ap
bjec
ect,t,NNam
pl
ic
io
ame:
n.
e:=="S
C
om
"She
Applicat
heet
an
et1"
dB
ation.Comm
1"
ar
s(
ha
mandBars("C
rt
")
.V
is
ib
le
"C
=
ha
Fa
rt
ls
")
e
.V
is
ib
le
= False
Activesheet.Charts(Chart1).Delete
14
Blog XQ (http://excelquotient.wordpress.com)
If <condition> then
<program>
Else If <condition> then
<program>
Else
<program>
EndIf
Do while <condition>
<program>
Loop
Do until <condition>
<program>
Loop
For <condition>
<program>
Next
15
Blog XQ (http://excelquotient.wordpress.com)
m = 0
Do Until ActiveCell.Value = ""
ActiveCell.Value = m
ActiveCell.Offset(1, 0).Select
m = m + 1
Loop
For m = 1 To 10
ActiveCell.Value = m
ActiveCell.Offset(1, 0).Select
m = m + 1
Next m
16
Blog XQ (http://excelquotient.wordpress.com)
Klik kanan pada menu apa saja lalu pilih Visual Basic
Atau klik menu Tools>Costumize
Pada tab Toolbar, centang Visual Basic lalu Close
17
Blog XQ (http://excelquotient.wordpress.com)
Sheet Main
VB Controls
18
Blog XQ (http://excelquotient.wordpress.com)
Sheet Data
19
Blog XQ (http://excelquotient.wordpress.com)
Sheet Support
20
Blog XQ (http://excelquotient.wordpress.com)
21
Blog XQ (http://excelquotient.wordpress.com)
=IF(Support!B2=TRUE,"Laki-laki",IF(Support!B2=FALSE,"Perempuan","")
22
Blog XQ (http://excelquotient.wordpress.com)
23
Blog XQ (http://excelquotient.wordpress.com)
24
Blog XQ (http://excelquotient.wordpress.com)
25
Blog XQ (http://excelquotient.wordpress.com)
26
Blog XQ (http://excelquotient.wordpress.com)
Program Code
Sheets (Main)
Sheets (Data)
ThisWorkbook
27
Blog XQ (http://excelquotient.wordpress.com)
28
Blog XQ (http://excelquotient.wordpress.com)
Finnishing Touch
29
asi
K
a
m
i
Ter
Jazaakumullah
Thank
You
ou
Arigat
Blog XQ
http://excelquotient.wordpress.com
Hatu
r
Nuhu
n
30