RSS Feed

Daily Archives: December 15, 2009

proram di macro exel

FUNGSI DO WHILE…LOOP

FUNGSI LTRIM

FUNGSI CHOOSE
Sub tugas3()

i = 1

Do While i <= 5

If i Mod 2 = 0 Then

i = 2 * i

Cells(i, 1) = i

Else

i = i + 2

Cells(i + 1, 2) = i

End If

Cells(i, 2) = i

Loop

End Sub

Sub agesdur()

Set Tabl = Sheets(1).Range(“a1:cv100″)

y = InputBox(“age?”)

Set yt = Sheets(1).Range(“a” + ltrim(Str(y)))

yt.Select

For i = 1 To 100

With yt.Cells(1, i).Interior

.ColorIndex = 3

End With

Next i

End Sub

Function NamaHari(noHari As Integer) As String

NamaHari = Choose(noHari, “ahad”, “senin”, “selasa”, “rabu”, “kamis”, “jumat”, “sabtu”)

End Function

Follow

Get every new post delivered to your Inbox.