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

[µo°Ý] VBA¦p¦ó¨ú±o³Ì«á¤@Ä檺Äæ¼Æ

[µo°Ý] VBA¦p¦ó¨ú±o³Ì«á¤@Ä檺Äæ¼Æ

¥»©«³Ì«á¥Ñ mave ©ó 2016-5-5 10:34 ½s¿è

¦U¦ì¤j¤j¦n

¤½¥q¨t²Î¤@¦¸¶×¥X¦U²Õ§Oªº³øªí¸ê®Æ®É¡A
²Õ§O»P²Õ§O¤§¶¡³£·|¦³ªÅ¥ÕÄæ¦ì¹j¶}(½Ð°Ñ¦Ò¤U¹Ï)


§Ú¨Ï¥ÎVBA¶i¦æªí®æ¥[¤u®É¡A
·Q­n±N¬õ°é³BªºªÅ¥ÕÄæ¦ì§R°£¡A
­Y¨Ï¥Î end(Xldown).row »yªk­pºâÁ`Äæ¦ì¼Æ¡A
¦A¨Ï¥Îif §PÂ_­Y¬°ªÅ¥Õ«h entirerow.delete
¦ý¬O¹J¨ìªÅ¥ÕÄæ¦ì³B´N­pºâ°±¤î¤F¡A¨Ï¥ÎµLªk­pºâ¥X¥¿½TÁ`Äæ¦ì¼Æ¡C

½Ð°Ý¦U¦ì¤j¤j¬O§_¦³¨ä¥Lªº»yªk©Î¬O¤è¦¡¥i¥H¸Ñ¨M¦¹°ÝÃD¶Ü?

¦^´_ 1# mave
¸Õ¬Ý¬Ý
Columns(1).SpecialCells(4).EntireRow.Delete
[b]Kubi[/b]

TOP

·PÁÂk¤j

§Ú¨Ó´ú¸Õ¬Ý¬Ý

TOP

¦^´_ 2# Kubi ½Ð±Ð
½Ð±Ð¤j¤j
SpecialCells(4)¬O¤°§t·N?

TOP

¦^´_ 4# yangjie
4 = xlCellTypeBlanks (ªÅ¥ÕÀx¦s®æ)
¤]´N¬O¡GSpecialCells(xlCellTypeBlanks)

¦A¬Ý¤@¦¸¹Ï¤ùµo²{­Y¥Î¦¹»yªk¡G©Ò¦³ªº³æ¦ì¡G¤p®É³o¦C³£·|³Q¤@¨Ö³Q§R°£¡C
­Y¥u­n«O¯d²Ä¤@¦Cªº³æ¦ì¡G¤p®É¡A«h»yªk½Ð§ï¬°¦p¤U¡G
Range("A3:A" & [A65536].End(3).Row).SpecialCells(4).EntireRow.Delete
[b]Kubi[/b]

TOP

¥»©«³Ì«á¥Ñ ML089 ©ó 2016-5-6 17:15 ½s¿è

ÁÙ¬O¥Î¦^°é¨Ó¨M¸Ñ

Sub ex()
    For r = Cells(Rows.Count, 1).End(xlUp).Row To 1 Step -1
        If 0 = Application.CountA(Range(Cells(r, "A"), Cells(r, "F"))) Then '§PÂ_A~FÄæ¨S¦³¸ê®Æ¤~§R°£¦¹¦C
            Rows(r).EntireRow.Delete
        End If
    Next
End Sub
{...} ªí¥Ü»Ý­n¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡

TOP

¦^´_ 6# ML089
·PÁÂK¤j M¤j
¾Ç²ß¨ì¤F

TOP

¦^´_ 6# ML089

·PÁÂMªº¸Ñµª
¤§«e³£¨S·Q¹L¥ÎEnd(xlUp).Row °f±À¦^¥h
ı±o¤]¬O¤@­Ó¤£¿ùªº¤èªk

¤£¹L¤p§Ì¤]¦³­Ó¤p°ÝÃD·Q¶¶«K½Ð±ÐM¤j
´N¬O¬°¦óµ{¦¡½X«e­±³£·|¥[¤WApplication©O?

§Ú¦³¦b¨ä¥L½g¤å³¹µo°Ý¹L¡A¥Ø«eÁÙ¨S¦³±o¨ìµª®×¡A
¤£ª¾M¤j¬O§_¥i¥H«ü±Ð©O?

TOP

¦^´_ 8# mave

³o¤TºØ³£¥i¥H¨ú±oEXCEL ¤u§@ªí¨ç¼Æ¦bVBA¤¤¨Ï¥Î¡C

Sub ex()
a = Application.WorksheetFunction.CountA([A:A])
b = Application.CountA([A:A])
c = WorksheetFunction.CountA([A:A])
Debug.Print a, b, c
End Sub
{...} ªí¥Ü»Ý­n¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡

TOP

¦^´_ 9# ML089

«z~~M¤jªº¦^ÂЯu¬O§Ö³t
¤p§Ì­è­è¤]¦³¬d¸ß¤FEXCEL»¡©ú
¥i¯à¬O¤p§Ì¥\¤O¤£¨¬¡A¬Ý¤F¦üÀ´«DÀ´

¤£¹L¬Ý¨ìM¤jªº¦^ÂФ§«á¡A¦n¹³¤S§ó¤F¸Ñ¤F¤@¨Ç
§Ú¤]§â»¡©úªº¤º®e¶K¤W­±¨Ñ¤j®a°Ñ¦Ò

TOP

        ÀR«ä¦Û¦b : ¤f»¡¦n¸Ü¡B¤ß·Q¦n·N¡B¨­¦æ¦n¨Æ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD