ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

½Ð°Ý³oVBA µ{¦¡½X¿ù»~ªº¦a¤è¬O¦³¤°»ò°ÝÃD©O?

½Ð°Ý³oVBA µ{¦¡½X¿ù»~ªº¦a¤è¬O¦³¤°»ò°ÝÃD©O?

¥»©«³Ì«á¥Ñ jeffrey628litw ©ó 2019-6-21 12:44 ½s¿è

½Ð°Ý³oVBA µ{¦¡½X¿ù»~ªº¦a¤è¬O¦³¤°»ò°ÝÃD©O?


'002­¶



           Sheets("¬Q¤é").Cells(v, 9).ClearContents

           Sheets("¬Q¤é").Cells(v, 10).ClearContents

           Sheets("¬Q¤é").Cells(v, 11).ClearContents

           Sheets("¬Q¤é").Cells(v, 12).ClearContents

      End If
    Next
Next
ActiveWorkbook.Worksheets("¬Q¤é").Sort.SortFields.Clear

ActiveWorkbook.Worksheets("¬Q¤é").Sort.SortFields.Add2 Key:=Range("e2:e99") _              --------------------------->³o¦æ·|¥X²{°ÝÃD
    , SortOn:=xlSortOnValues, Order:=x1Ascending, DataOption:=xlSortNormal                     --------------------------->³o¦æ·|¥X²{°ÝÃD
¹Ï¤ù 1.jpg
2019-6-21 12:43

    With ActiveWorkbook.Worksheets("¬Q¤é").Sort
     .SetRange Range("C1:199")
     .Header = xlYes
     .MatchCase = False
     .Orientation = xlTopToBottom
     .SortMethod = xlPinYin
     .Apply
  End With
  
  
'¶ñ¤W¬Q¤éÂà³t¡B¬Q¤éM


r = 2

r1 = 2


Do While Sheets("¬Q¤é").Cells(r, 5) <> ""

   Do While Sheets("°Ñ¼Æ").Cells(rl, 1) <> ""

      If Sheets("¬Q¤é").Cells(r, 5) = Sheets("°Ñ¼Æ").Cells(rl, 1) Then

         Sheets("°Ñ¼Æ").Cells(rl, 5) = Round(Sheets("¬Q¤é").Cells(r, 6) * 60 * 18 / 1000, 0)


  End If

r1 = r1 + 1


Loop

r1 = 2

r = r + 1

Loop


'¶}©l¶i¦æ»s¥O³æ¤é¼Æ­pºâ§@·~


Range("AK3:AMIOO").ClearContents

Range("AQ3 :BL38").ClearContents

For i = 4 To 2000 '¤j±Æµ{°_¨´¦C¼Æ¡A¦ô2000¦C¡A²M°£¥ªÄæ¦U²Ä¤T®æªº¤º®e¡A¥H²Åµ{¦¡©Ò»Ý


    If InStr(Sheets("±Æµ{½Æ»s").Cells(i + 1, 1).Value, "¤ë") <> 0 Then

       Sheets("±Æµ{½Æ»s").Cells(i, l).ClearContents


    End If



'003­¶


ÀɮפU¸ü¡G 20190621 VBA ¦Û°Ê²£¥Í±Æµ{ v.02.rar (33.83 KB)

¦^´_ 1# jeffrey628litw


·Pı¦bª±¤j®a¨Ó§äâí.............

ActiveWorkbook.Worksheets("¬Q¤é").Sort.SortFields.Add2 Key:=Range("e2:e99") _              
    , SortOn:=xlSortOnValues, Order:=x1Ascending, DataOption:=xlSortNormal

¦h¤F­Ó"2"¡A1 §ï¦¨ "L"
¥¿½T¼gªk¦p¤U

ActiveWorkbook.Worksheets("¬Q¤é").Sort.SortFields.Add Key:=Range("e2:e99") _              
    , SortOn:=xlSortOnValues, Order:=xLAscending, DataOption:=xlSortNormal
µ{¦¡¬O¨Ì»Ý¨D¼gªº¡A»Ý¨Dªí¹F¤£²M·¡
©ÎªÌ¨S¦³¤W¶Çªþ¥ó¡A·R²ö¯à§U

TOP

¦^´_ 2# n7822123


    ÁÂÁ¤j¤jÀ°¦£¡A§Ú¬Q±ßÁÙª¦¤å§ä¤é¥»ºô¯¸¡Aµ²ªG¨S¹ï·Ó¥X¨Ó¡AÁÂÁ±z¡C


±µ¤U¨ÓÁÙ¦³°ÝÃD¡A³oµ{¦¡½X

           order1 = 0 '»s¥O³æ¤Ñ¼Æ
            
            Change = 0 '´«³W®æÁ`®É¶¡
            
            hr3 = 0
            
            b = 48
            
            i1 = i



'004 ­¶



        il1 = i1 + 12
        
        a = a + 1
        
      End If

   End If
   
  '¤@¶g¨â³Wªº±Æªk¡A¦ýµL¤W³W¡A¶·¥ý­pºâ
  
  
      If j > 1 And Sheets("±Æµ{½Æ»s").Cells(i, 1) <> "" And InStr(Sheets("±Æµ{½Æ»s").Cells(i, 1).Value, "¤ë") = 0 And Sheets("±Æµ{½Æ»s").Cells(i, j) = "" And Len(Sheets("±Æµ{½Æ»s").Cells(i + 2, j)) > 10 And Len(Sheets("±Æµ{½Æ»s").CeIls(i + 3, j)) > 10 And InStr(Sheets("±Æµ{½Æ»s").Cells(i + 2, j).Value, "¤w­pºâ¹L") = 0 Then                                     -------------------->³o¤@¦æ¦³°ÝÃD



            If InStr(Sheets("±Æµ{½Æ»s").Cells(i + 2, j).Value, "-") = 0 Or InStr(Sheets("±Æµ{½Æ»s").Cells(i + 2, j).Value, "-") > 19 Then '¨S¦³³s±µ²Å¸¹¡A©Î³s±µ²Å¸¹¦b²Ä20¦ì¤¸¥H«á¡A¦]¬°¦³ªº«È¤á¦WºÙ¦³³s±µ²Å¸¹


            e = Sheets("±Æµ{½Æ»s").Cells(i + 3, j).Value '¥]§t½u§÷¡B¼Æ¶qªºÀx¦s®æ
            
            el = Sheets("±Æµ{½Æ»s").Cells(i + 2, j).Value '¥]§t³W®æªºÀx¦s®æ


            i1 = i + 2


             If InStr(Sheets("±Æµ{½Æ»s").CelIs(i + 2, j).NoteText, Sheets("¬Q¤é").Cells(a - 2, 3).Value) <> 0 Then '¦pªG¬O²{¦æ»s¥OªºÀx¦s®æ


            CURR = 1
            
            

            HRS = Mid(e, InStr(e, "-1") + 1, Len(e) - InStr(e, "-")) '¶}©l¨ú½u®|¡B§Îª¬¡A²Ä¤@­Ó³s±µ²Å¸¹«á¡AÄ~Äò¨ú½u®|¡B§Îª¬


            If InStr(Left(HRS, 6), "H") <> 0 Then

            HRS = Left(HRS, InStr(num, "H"))
            
            
            End If


            If InStr(Left(HRS, 6), "R") <> 0 Then

            HRS = Left(HRS, InStr(num, "R"))
            
            
            If InStr(Left(HRS, 6), "S") <> 0 Then

            HRS = Left(HRS, InStr(num, "S"))
            
            
            End If
            
            
            End If

            If CURR = 1 Then
            
            
              If Sheets("±Æµ{½Æ»s").Cells(i1, j).Interior.Colorlndex = 37 Or Sheets("±Æµ{½Æ»s").Cells(il, j).Interior.ColorIndex = 20 Or Sheets("±Æµ{½Æ»s").Cells(i1, j).Interior.Colorlndex = 24 Then       '¦³»s¥O¥B«D²¾³æªÌ


                '   Call MM123(a, b, c, e, el, i, il, j, hrl, hr2, hr3, item0, iteml, HRS0, HRS, orderl)
     
     item0 = Item   '¦s¬°«e³W®æ


     HRS0 = HRS

               End If


            End If





'005 ­¶




             Sheets("±Æµ{½Æ»s").Cells(i + 2, j).Value = "¤w­pºâ¹L" & Sheets("±Æµ{½Æ»s").Cells(i + 2, j).Value
        
        
        End If
        
   End If

ÀɮפU¸ü¡G 20190622 VBA ¦Û°Ê²£¥Í±Æµ{ v.3.rar (28.15 KB)

TOP

¦^´_ 3# jeffrey628litw


  Len(Sheets("±Æµ{½Æ»s").CeIls(i + 3, j)) > 10
µ{¦¡¬O¨Ì»Ý¨D¼gªº¡A»Ý¨Dªí¹F¤£²M·¡
©ÎªÌ¨S¦³¤W¶Çªþ¥ó¡A·R²ö¯à§U

TOP

¦^´_ 4# n7822123


    ÁÂÁ¤j¤jªºÀ°¦£¡A§Ú²´¤O¯uªº¬O¤£¦n¡A¤w¸g¥h°t²´Ãè¤F¡A¦A¦¸·PÁ±z¡C

TOP

        ÀR«ä¦Û¦b : ¤H­n¦Û·R¡A¤~¯à·R´¶¤Ñ¤Uªº¤H¡C
ªð¦^¦Cªí ¤W¤@¥DÃD