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

[µo°Ý] VBA¦h¬¡­¶¤@¦¸§R°£ªÅ¥Õ¦C

[µo°Ý] VBA¦h¬¡­¶¤@¦¸§R°£ªÅ¥Õ¦C


¥H¤U¥¨¶°¬Oºô¸ô¤WÃä¬d¸ê®ÆÃä§ïªº¡A°Ê§@¦p¤U:
1. ¥þ¿ï"11&52", "12", "13", "14", "15", "21&26", "22", "24", "25", "32", "34", "41", "42", "43", "44", "47", "61", "62", "64", "71", "81", "82", "83", "84", "85", "91", "92", "M2"¥H¤W¬¡­¶
2. ¿ï¾ÜRows("5:50")½Æ»s¶K¤W¬°­È¡]­ì¥»"5:50"¬O¤½¦¡¡^
3. ¦pªGRows("5:50")AÄ欰ªÅ¥Õ¡A«h¥Ñ50¦Ü5³v¤@§R°£ªÅ¥Õ¦C

§Æ±æºô¤j¥i¥H¨ó§U­×§ï¤@¤U¹F¨ì¥H¤U»Ý¨D¡G
1. ¥Ø«e¬O¤@­Ó¬¡­¶¤@­Ó¬¡­¶°Ê§@¡A§Æ±æ¥i¥H¹F¨ì28­Ó¬¡­¶¤@¦¸°Ê§@¡A´î¤Öµ¥«Ý³v¤@¬¡­¶°Ê§@ªº®É¶¡
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Sub ¾ã²z­q³æ()
Application.Calculation = xlCalculationManual 'Ãö³¬¦Û°Ê­«ºâ, ¥[§Ö³t«×
    Sheets(Array("11&52", "12", "13", "14", "15", "21&26", "22", "24", "25", "32", "34", "41", "42", "43", "44", "47", "61", "62", "64", "71", "81", "82", "83", "84", "85", "91", "92", "M2")).Select
    Rows("5:50").Select
    Application.CutCopyMode = False
    Selection.Copy
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False

arr = Array("11&52", "12", "13", "14", "15", "21&26", "22", "24", "25", "32", "34", "41", "42", "43", "44", "47", "61", "62", "64", "71", "81", "82", "83", "84", "85", "91", "92", "M2")
For y = 0 To 27
Sheets(arr(y)).Select
  For i = 50 To 5 Step -1
      If Cells(i, "A") = "" Then
          Rows(i).Delete
      End If
  Next
Next
Application.Calculation = xlCalculationAutomatic '«ì´_¦Û°Ê­«ºâ
End Sub

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
´ú¸Õ.rar (16.6 KB)
*¦v¤k¤@ªTµL»~*

¦^´_ 1# msmplay

¤£·q³dªºÂ²³æ§ï¨}
  1. Sub ¾ã²z­q³æ()
  2. Application.Calculation = xlCalculationManual 'Ãö³¬¦Û°Ê­«ºâ, ¥[§Ö³t«×
  3. Selection.Copy
  4.   arr = Array("11&52", "12", "13", "14", "15", "21&26", "22", "24", "25", "32", "34", "41", "42", "43", "44", "47", "61", "62", "64", "71", "81", "82", "83", "84", "85", "91", "92", "M2")
  5. For y = 0 To 27
  6.     Sheets(arr(y)).Range("A5").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone
  7. Next

  8. For y = 0 To 27
  9. Sheets(arr(y)).Select
  10.   For i = 50 To 5 Step -1
  11.       If Cells(i, "A") = "" Then
  12.           Rows(i).Delete
  13.       End If
  14.   Next
  15. Next
  16. Application.Calculation = xlCalculationAutomatic '«ì´_¦Û°Ê­«ºâ
  17. End Sub
½Æ»s¥N½X

TOP

¦^´_ 2# naruto018


   n¤j~~~~ÁöµM³Ì«áªº§R°£ªÅ¥Õ¦C°Ê§@ÁÙ¬O¨C­Ó¬¡­¶³v¤@°õ¦æ¡A¦ý¾ãÅé·Pı¦n¹³¦³§Ö¤@ÂI£®¡A«D±`·PÁ§A³á~~~~~~~~
*¦v¤k¤@ªTµL»~*

TOP

¦^´_ 1# msmplay

°õ¦æ«e¥[¤J¤U¦C«ü¥O¿Ã¹õ¤£Åã¥Ü°õ¦æª¬ªp
Application.ScreenUpdating = False

­ì¥ýµ{¦¡½X

Application.ScreenUpdating = True
{...} ªí¥Ü»Ý­n¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡

TOP

¦^´_ 3# msmplay


    ·Q­n¥[§Öµ{¦¡¹B¦æªº¸Ü¡A¦³«Ü¦h¤è¦¡
¨Ò¦p¡G¥h°£µ{¦¡¤¤¥i¬Ù²¤ªº³¡¤À
©Î¬O¹³ML089¤j¨º¼Ë²K¥[´î¤Ö¹B¦æ®É°Ê§@ªºµ{¦¡½X
©Î¬O¥H¬Û¦P¥\¯à¦ý§ó°ª®Ä¯à¤è¦¡¥h°õ¦æªºµ{¦¡½X

TOP

¦^´_ 4# ML089

M¤j~~~~~«D±`·PÁ¡I¡I¡I
*¦v¤k¤@ªTµL»~*

TOP

¦^´_ 5# naruto018


   n¤j~~~¨ä¹ê¨ä¹ê¤X¡I¦]¬°§Ú¤£¬O«ÜÀ´µ{¦¡¡A¦ý¤S¦]¬°¤u§@»Ý¨D§Æ±æ¯à¥[§Ö§@·~®Ä²v~~~¤~·|¦Û¤v¤Wºô§ä¤èªk¸ò¦Û¤v´ú¸Õ¬Ý¬Ý¡I¦pªGn¤j¯àÀ°¦£­×§ï¸òÀu¤Æ¦¹µ{¦¡½X¡A¨º´N¯uªº¬O·P¿E¤£ºÉ¤F~~~~~~~
*¦v¤k¤@ªTµL»~*

TOP

arr = Array(¡ã¡ã¤u§@ªí¦W¡ã¡ã)
On Error Resume Next
For Each sh In arr
¡@¡@Sheets(sh).Range("A5:A50").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
Next
On Error GoTo 0

TOP

¦^´_ 8# ­ã´£³¡ªL


   ­ã¤j~~ÁÂÁ§A³á~~~~~~~~~~
*¦v¤k¤@ªTµL»~*

TOP

        ÀR«ä¦Û¦b : «Î¼e¤£¦p¤ß¼e¡C
ªð¦^¦Cªí ¤W¤@¥DÃD