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

½Ð°Ý¦U¦ì¤j¯«¥[§Ö VBA §R°£¬°0ªºÀx¦s®æ¤½¦¡ªºµ{¦¡¼gªk

½Ð°Ý¦U¦ì¤j¯«¥[§Ö VBA §R°£¬°0ªºÀx¦s®æ¤½¦¡ªºµ{¦¡¼gªk

¥H¤U¬O§Úª¦¤å§ì¨ìªº¡A¦ý¹ê¥Î«á¶]ÀÉ®×10MB¡A

¤u§@ªí¤¤  DÄæ  §PÂ_¨Ã§R°£ 100µ§¥ª¥k0ªº¤½¦¡¸ê®Æ¡Aªá¤F7¤ÀÄÁ¡A
½Ð°Ý¦p¦ó¥[§Öµ{¦¡½X¶]ªº³t«×©O?

¦p¦ó¥[§Ö¦¹ VBA  Module10 µ{¦¡ªº³t«×©O?
Sub TT()

Dim t1
   
    t1 = Timer   '³o¬O²£¥Í¬í¼Æªº MSG
   '==============================================================

  '§R°£  D Äæ(Àx¦s®æ O2~O101)¬°0®ÉªºÀx¦s®æ¤½¦¡¸ê®Æ
  
   Range("D2").Select
   
     For X = 1 To 1
     For y = 2 To 101

     If ActiveCell(y, X) = 0 Then

        ActiveCell(y, X) = ""

     Else
     
     End If
     
     
     Next y
     
     Next X


'¥H¤U¬°Åã¥ÜVBA Runµ{¦¡ªº®É¶¡ + ³o¬O²£¥Í¬í¼Æªº MSG
MsgBox "§ì¸ê®Æ§¹¦¨!  " & Chr(10) & "¨Ï¥Î®É¶¡¡G" & Round(Timer - t1, 2) & " ¬í" & Chr(10) & "±z¿é¤Jªº±ø¥ó¤ñ¹ï«á¡A¦@­p¦³" & "  " & Application.CountA(Sheets("¤ñ¹ï¼t½s«á¸ê®Æ").Columns("A:A")) - 1 & "  " & "µ§¸ê®Æ"
  
'¥H¤U¬°²£¥ÍMsgbox »¡©ú¤ñ¹ï«á¦³´Xµ§¤£­«½Æªº¸ê®Æ
    'MsgBox "±z¿é¤Jªº" & "±ø¥ó" & "¤ñ¹ï«á¡A¦@­p¦³" & "  " & APplication.CountA(Sheets("¤ñ¹ï¼t½s«á¸ê®Æ").Columns("A:A")) - 1 & "  " & "µ§¸ê®Æ"
   

End Sub


'==============================================================


ÀɮפU¸ü¡G ABC 20191219-V.04ª©.rar (167.63 KB)

'§R°£  D Äæ(Àx¦s®æ D2~D101)¬°0®ÉªºÀx¦s®æ¤½¦¡¸ê®Æ

À³¸Ó¬O D2 ~ D101

TOP

¤£¦n·N«ä¡A¬O§Ú¥t¤@­Ó¼Ò½k¬d¸ßªí¸ê®Æ¦³3000µ§¾É­P³t«×ÅܺC¡A§Ú¤w¸g±N¼Ò½k¬d¸ßªí¬d¸ß±ø¥ó§ï±¼Â«K«Ü§Ö¤F¡CÁÂÁ¦U¦ì¡C

TOP

¥»©«³Ì«á¥Ñ adrian_9832 ©ó 2019-12-20 21:10 ½s¿è

°²³] ¨C¦¸D¨º¦æ   0 ¼Æ­È¨º¦æªº¸ê®Æ  ¨S¦³¤¤Â_  ¦Ó¥B¸ê®Æ³£¬O ¤@ª½¬O0  ¦Ó¥B¤£·|  0  0  0  0 ¤§«á¤£¬O  0   ¦A¤§«á¤S¬O  0      

Sub test()


i = 2


Do Until Cells(i, 4) = ""

    If Cells(i, 4) = "0" Then
        Count = Count + 1
    Else
        Start = i
    End If
   
   

i = i + 1
Loop


Range("d" & Start + 1 & ":" & "d" & Count + 10).Select

Selection.ClearContents

End Sub


³Ì«á´£¿ô¤@¤U ¥H¤W¥u¥i¥H¦b  ¤@¦æ ³£¬O 0  ¤~¯à¥Î
¤ñ¦p¥H¤U³o¼Ë:
111
222
333
abc
123aft
2t1111
0
0
0
0
0
0
0
0
0
0
0
0
....

¦Ó¤£¬O³o¼Ë±¡ªp¤U¥Î
0
0
0
1
0
1
0
1
0
1
0
1
0
0
0
1
0
1

Â^¨ú.PNG (86.44 KB)

Â^¨ú.PNG

TOP

¥»©«³Ì«á¥Ñ adrian_9832 ©ó 2019-12-20 21:23 ½s¿è
  1. ¤èªk2:
  2. Sub test2()

  3.     Columns("D:D").Select
  4.     Selection.SpecialCells(xlCellTypeFormulas, 1).Select
  5.     Selection.ClearContents
  6. End Sub
½Æ»s¥N½X
³o¥i¥H¹j¸ê®Æ   ¦Ó¥B²³æ §Ö±¶

TOP

¦^´_ 4# adrian_9832


    ¤j¤j±z¦n¡G¹ê´úµ²ªG¬OOKªº¡A§Úªº¹q¸£³t«×¬ù70¬í¡C·PÁ¤j¤jªº«ü¾É¤À¨É¡C

TOP

¦^´_ 5# adrian_9832


        ¤j¤j±z¦n¡G¹ê´úµ²ªG¬OOKªº¡A§Úªº¹q¸£³t«×¤]¬O¬ù70¬í¡C·PÁ¤j¤jªº«ü¾É¤À¨É¡C

TOP

¥»©«³Ì«á¥Ñ quickfixer ©ó 2019-12-24 05:30 ½s¿è

¦^´_ 1# jeffrey628litw

§AªºÀY§À¦U¥[1¦æApplication.Calculation,´N¥i¥H¶]«Ü§Ö¤F
ABC 20191219-V.04ª©,¨S­×§ï«e,§Úªº¹q¸£­n¶]40¬í
sub tt()
       Application.Calculation = xlCalculationManual

§Aªºµ{¦¡½X

       Application.Calculation = xlCalculationAutomatic
end sub
°õ¦æµ²ªG¦p¤U


¥Î4f,5f§ó§Ö
sub tt()
       Application.Calculation = xlCalculationManual
4f,5fµ{¦¡½X
       Application.Calculation = xlCalculationAutomatic
end sub
°õ¦æµ²ªG¦p¤U
Image 9.png

TOP

¦^´_ 8# quickfixer

  ·PÁ¤j¯«ªº¨ó§U¡A¶W·P¿Eªº¡C

TOP

        ÀR«ä¦Û¦b : ¤p¨Æ¤£°µ¡B¤j¨ÆÃø¦¨¡C
ªð¦^¦Cªí ¤W¤@¥DÃD