- ©«¤l
- 8
- ¥DÃD
- 3
- ºëµØ
- 0
- ¿n¤À
- 16
- ÂI¦W
- 0
- §@·~¨t²Î
- xp
- ³nÅ骩¥»
- sp3
- ¾\ŪÅv
- 10
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-10-26
- ³Ì«áµn¿ý
- 2010-11-30
|
¦U¦ì¤j¤j..°ÝÃD¤jP³B²z¦n¤F¡A¤£°_·N«ä¥´ÂZ¦U¦ì¡C
¥Dµ{¦¡
Private Sub CommandButton1_Click()
Dim a As Integer
Call aa
End Sub
°Æµ{¦¡
Sub aa() 'Function aa() '¥»°êÄy¤@¯ë¡B¥~Äy°êÄy-¶V«n¡B¬Z´¶¹ë¡B¬Z´¶¹ë¡B®õ°ê¡Bµá«ß»«¡B¦L¥§¡B¨ä¥L
Dim strYear As String 'ÅܼÆ-²Îpªº¦~¤ë
Dim strNo As String 'ÅܼÆ-®×¸¹ªº¦~¤ë
Dim strCountry As String 'ÅܼÆ-°êÄy
Dim intAmount As Integer 'ÅܼÆ-µ§¼Æ
Dim i, l, h, b, ii As Integer 'ÅܼÆ-Äæ ¦C
Dim j, w As Integer 'ÅܼÆ-²Îp¼Æ
j = 0
w = 0
a = 57
While a < 72
b = a
c = b + 1
intAmount = Application.CountA(Sheets("¨ühªÌ").Range("A2:A65535")) + 1 '¨úµ§¼Æ
For h = b To c
For l = 12 To 23
Select Case h
Case Is <= 58
ii = 37
Case Is <= 62
ii = 41
Case Is <= 64
ii = 43
Case Is <= 66
ii = 45
Case Is <= 68
ii = 47
Case Is <= 70
ii = 49
Case Is <= 72
ii = 51
End Select
strYear = Application.WorksheetFunction.Text((Sheets("©u²Îp").Cells(2, 3) & Sheets("©u²Îp").Cells(5, l)), 0)
strCountry = Application.WorksheetFunction.Text((Sheets("©u²Îp").Cells(h, 3) & "-" & Sheets("©u²Îp").Cells(h, 4)), 0)
'¨ú¦~¤ë¥÷-©u²Îp
For i = 2 To intAmount
strNo = Mid(Sheets("¨ühªÌ").Cells(i, 1), 3, 4)
If strNo = strYear Then '¦~¤ë¥÷-§PÂ_®×¸¹¬O§_µ¥©ó©u²Îp
If Sheets("¨ühªÌ").Cells(i, 4) = "¦¨®×" Then '¦¨®×-§PÂ_®×¥ó¬O§_¦¨®×
If Sheets("¨ühªÌ").Cells(i, h - ii) = strCountry Then '¨ühªÌ¥»¨¯S®íª¬ªp-§PÂ_¨ühªÌ¥»¨¯S®íª¬ªp¬O§_Äݹê
j = j + 1
End If
End If
End If
w = j
Next i
j = 0
Sheets("©u²Îp").Cells(h, l).Value = w
Next l
Next h
a = a + 2
Wend
End Sub |
|