- ©«¤l
- 522
- ¥DÃD
- 36
- ºëµØ
- 1
- ¿n¤À
- 603
- ÂI¦W
- 0
- §@·~¨t²Î
- win xp sp3
- ³nÅ骩¥»
- Office 2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-12-13
- ³Ì«áµn¿ý
- 2021-7-11
|
- ' ¥»VBA½Ð©ñ¦bSheet(1), ¤£n©ñ¦b Module1
- ' ¤U¦C¨â¦C ******** ¤§¶¡½Ð¥ý½Õ½Õ¦n, ¦A°õ¦æ¥»VBA
- Sub TEST3()
- Dim I As Integer, J As Integer, Col As Integer
- Dim arST, arET, arKind
- ''***********************
- Dim ndx(10) As Integer, cnt(10) As Integer '¦h¼g¤@ÂI³Æ¥Î, ¨S¥Î¨ì¤]¨SÃö«Y
- arKind = Array("X", "O", "V", "¡·", "¡¯") '¥i¼W´î, ¨S¥Î¨ì¤]¨SÃö«Y
- '²Å¸¹±Æ¦C¶¶§Ç, »P±N¨Óªº¿é¥X¶¶¦³Ãö
- arST = Array("17:20", "17:21", "17:22", "17:23") '°_©l®É¶¡, ³Ì¦h¥u¯à¤ñ"V,O,X,¡·,¡¯"¤Ö1
- arET = Array("19:20", "19:21", "19:22", "19:23") 'µ²§ô®É¶¡, ³Ì¦h¥u¯à¤ñ"V,O,X,¡·,¡¯"¤Ö1
- ''***********************
- Col = 8 'H=8, ©m¦W¿é¥X¦ì¸m¦b [H13]
-
- '1. §¹¥þ²M°£¿é¥X°Ï(¥]§t¤º®e¡B®æ¦¡µ¥)
- [H12:IV15].Clear
-
- '2. ««Ø®É¶¡
- For I = 0 To UBound(arKind) - 1
- cnt(I) = Application.CountIf(Range("C2", "C" & [C65536].End(xlUp).Row), arKind(I))
- If cnt(I) > 0 Then
- ndx(I) = Col
- Col = Col + cnt(I)
- If I <> UBound(arKind) - 2 Then
- For J = 13 To 15
- Cells(J, Col).Resize(1, 2).Merge '®É¶¡®æ¦X¨Ö
- Cells(J, Col).HorizontalAlignment = xlCenter
- Next
- Cells(13, Col) = arST(I) '°_©l®É¶¡¦b²Ä13¦C
- Cells(14, Col) = "~" '"~" ¸¹¦b²Ä14¦C
- Cells(14, Col).Orientation = -90 '¤å¦r¤è¦V¡÷¥kÂà90«×(¿ý¨Óªº)
- Cells(15, Col) = arET(I) 'µ²§ô®É¶¡¦b²Ä15¦C
- '¦p»Ý¨ä¥L®æ¦¡, ½Ð¦Û¦æ¿ý»s¦A¿ï¥Î¶K¤W(µL¶·¥þ³¡·Ó§Û)
- End If
- Col = Col + 2
- End If
- Next
-
- '3. ¶}©l¿é¥X©m¦W
- For Each E In Range("B2", "B" & [B65536].End(xlUp).Row)
- If E.Offset(0, 1) = "" Then GoTo Next1:
- For I = 0 To UBound(arKind) - 1
- If E.Offset(0, 1) = arKind(I) Then
- Cells(12, ndx(I)) = arKind(I) 'Åã¥Ü¼Ð°O(¦]¦³¨Ç²Å¸¹§A¤£·Q¥Î, ¬G¥[µù¤~·|²M·¡), ¥iµù¸Ñ±¼
- Cells(13, ndx(I)) = E
- Cells(13, ndx(I)).Resize(3, 1).Merge '©m¦W®æ¦X¨Ö
- Cells(13, ndx(I)).Orientation = xlVertical '¤å¦r¤è¦V¡÷««ª½±Æ¦C
- ndx(I) = ndx(I) + 1
- GoTo Next1:
- End If
- Next
- Next1:
- Next
- End Sub
½Æ»s¥N½X ¦^´_ 17# 074063 |
|