18. VBA
Dim i As Integer
Dim columnInternal As String
Dim columnInvoicedAmt As Double
Dim rowNum As Boolean
Dim tmp As Variant
Dim < > As < >
Option Explicit
http://www.asahi-net.or.jp/~ef2o-inue/vba_k/sub04_040.html
http://www.asahi-net.or.jp/~ef2o-inue/vba_k/sub04_050_06.html
19. ( )
Integer String
Long Date
Single Object
Double Variant
Currency Boolean
http://excelvba.pc-users.net/fol5/5_2.html
20. =
a = 100
a 100
a ← 100
a 100
i = i + 1
i i 1
:i = 2 i = i + 1 i = 3
http://home.att.ne.jp/zeta/gen/excel/c04p22.htm
23. if
(if )
If 1 Then
1
ElseIf 2 Then
2
Else
1 2
End If
*ElseIf Else
http://excelvba.pc-users.net/index.html
6
http://excelvba.pc-users.net/fol6/6_1.html
http://www.asahi-net.or.jp/~ef2o-inue/vba_k/sub04_050_02.html
24. :
If Cells(1,1).Value = 1 Then
Cells(1,2).Value = “Foo”
ElseIf Cells(1,1).Value = 2 Then
Cells(1,2).Value = “bar”
Else
Cells(1,2).Value = “hoge”
End If
Cells(1,1) ( A1) -
1 Cells(1,2) ( B1) “Foo”
2 Cells(1,2) ( B1) “bar”
Cells(1,2) ( B1) “hoge”
ElseIf
( )
25. For Next
( if
)
For = To
Next
For i j
http://excelvba.pc-users.net/fol6/6_3.html
http://www.sigoto.co.jp/excel/statement/state09.htm
(For each Next )
26. :
Dim i As Integer
For i = 1 To 10
Cells(i, 1).Value = i * 10
i = i + 1
Next
i 1 i
( )
For i = 1 To 10 Next i 1 10
Cells(i, 1).Value = i * 10 Cells(i, 1) i*10
i = i + 1 i 1 ” i
+ 1”
31. Client Project Number Client
Internal % % (+ )
Vendor % (+ )
Invoiced Amt Project Total
Invoiced Amount 0
Invoiced Amt
GM
Client Name BU Name CompDate BDM
GM%
: