- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¦^´_ 18# prince0413 - Const ¦ = "10:00~18:00"
- Const ¥þ¤é = "10:30~18:30"
- Const ±ß = "11:00~19:00"
- Sub Ex()
- Dim Rng(1 To 2) As Range, i As Integer, ¥X¶Ô As String, M As Variant
- Sheets("°²¤é¥X¶Ô³æ").PageSetup.PrintArea = "A1:H13" '¤@¶´N°÷¤F
- Set Rng(1) = Sheets("°²¤é¥X¶Ô³æ").Range("J2") '³]©w©m¦W
- Do While Rng(1) <> "" '°õ¦æ°j°éªº±ø¥ó:©m¦W<>""
- With Sheets("11¤ë")
- Set Rng(2) = .Range("B:B").Find(Rng(1), LOOKAT:=xlWhole)
- M = Application.Match(Rng(1), Sheets("¤¤^¤å©m¦W¹ï·Óªí").Range("A:A"), 0) 'Match : ¤u§@ªí¨ç¼Æ
- If IsError(M) Then MsgBox "¤¤^¤å©m¦W¹ï·Óªí ¤¤¨S¦³ : " & Rng(1): Exit Sub
- If Not Rng(2) Is Nothing Then
- i = 3 '²Ä3Äæ :C
- Do While IsNumeric(.Cells(4, i)) '°õ¦æ°j°éªº±ø¥ó:²Ä4¦C¬O¼Æ¦r
- If .Cells(5, i) = "¤»" Or .Cells(5, i) = "¤é" Then
- ¥X¶Ô = "" 'Âk¹s
- If .Cells(Rng(2).Row, i) Like "*¦*" Then
- ¥X¶Ô = ¦
- ElseIf .Cells(Rng(2).Row, i) Like "*±ß*" Then
- ¥X¶Ô = ±ß
- ElseIf .Cells(Rng(2).Row, i) Like "*¥þ¤é*" Then
- ¥X¶Ô = ¥þ¤é
- End If
- If ¥X¶Ô <> "" Then
- Sheets("°²¤é¥X¶Ô³æ").Range("B3") = Sheets("¤¤^¤å©m¦W¹ï·Óªí").Cells(M, "B") '©m¦W: ¹ï·Ó¥X¦bBÄ檺 M¦C
- Sheets("°²¤é¥X¶Ô³æ").Range("D3") = Rng(2).Offset(, -1) 'ªÀû½s¸¹
- Sheets("°²¤é¥X¶Ô³æ").Range("A5") = DateSerial(2013, 11, .Cells(4, i)) '¤é´Á
- Sheets("°²¤é¥X¶Ô³æ").Range("B5") = ¥X¶Ô '®É¶¡
- Sheets("°²¤é¥X¶Ô³æ").Range("D5") = IIf(.Cells(4, i) = "¤»", "(¬P´Á¤»)", "(¬P´Á¤é)") & "¨FÀsÀç·~"
- Sheets("°²¤é¥X¶Ô³æ").PrintOut '¦L¦C¥X¶Ô³æ
- End If
- End If
- i = i + 1
- Loop
- End If
- End With
- Set Rng(1) = Rng(1).Offset(1) '¤U¤@¦ì©m¦W
- Loop
- End Sub
½Æ»s¥N½X |
|