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

¦p¦ó¥Îvba§R°£¤£¬O·í¤é¤é´Á

¦p¦ó¥Îvba§R°£¤£¬O·í¤é¤é´Á

½Ð°Ý¦p¦ó¥ÎVBA
AÄæ¦ì¬°¤é´ÁÄæ¦ì
­Y¤£¬O·í¤é¤é´Á«h§R°£¨º¤@¾ã¦C
ÁÂÁÂ

¦^´_ 1# jerrystock

µ¹§A°Ñ¦Ò
  1. Public Sub §R°£_Range()
  2. b = Date
  3. 100:
  4.     For Each Ran In Range("a1:a" & Cells(Rows.Count, "a").End(xlUp).Row)
  5.         If Ran <> b Then
  6.             ¤u§@ªí2.Rows(Ran.Row).Delete Shift:=xlUp
  7.             GoTo 100
  8.         End If
  9.     Next
  10. End Sub
½Æ»s¥N½X

TOP

¦^´_ 2# lpk187
ÁÂÁ¤j¤j«ü¾É °õ¦æµ{¦¡½X«á¾ã­ÓEXCEL¨S¦^À³·í¦í »Ý­n±j¨îÃö³¬EXCEL
¤é´Á®æ¦¡¬O20150316
ÁÂÁÂ

TOP

¦^´_ 3# jerrystock


    ¥i¥H¶Ç§AªºÀɮפW¨Ó¬Ý¶Ü¡H

TOP

¦^´_ 1# jerrystock
  1. Sub Test()
  2.     Dim i As Long
  3.    
  4.     With ActiveSheet
  5.         '§R°£­n¥Ñ«á©¹«e§R
  6.         For i = .Cells(.Rows.Count, "A").End(xlUp).Row To 1 Step -1
  7.             If StrComp(.Cells(i, "A").Text, Format(Date, "yyyymmdd"), vbTextCompare) <> 0 Then .Rows(i).Delete Shift:=xlUp
  8.         Next
  9.     End With
  10. End Sub
½Æ»s¥N½X
ªí¹F¤£²M¡BÃD·N¤£©ú½T¡B¨SªþÀɮ׮榡¡B¨S¦³°Q½×°ÝÃDªººA«×~~~~~~¥H¤W·R²ö¯à§U¡C

TOP

¦^´_ 5# stillfish00
ÁÂÁ¤j¤j¦^ÂÐ ¥i¥H¦¨¥\°õ¦æ
¥i¥H¦A½Ð±Ð¤@­ÓºÃ°Ý¬O¦pªGA1Äæ¦ì¬°¼ÐÃD©m¦W B1¼ÐÃD¬°¤é´Á B2¶}©l®æ¦¡¬°2015/03/16½Ð°Ý³o¼ËVBA¦p¦ó§R°£¤£¬O·í¤é¤é´Áªº¤@¾ã¦C
³Â·Ð¤j¤j ÁÂÁÂ

TOP

¦^´_ 6# jerrystock
§Aı±oÀ³¸Ó«ç»ò§ï?
ªí¹F¤£²M¡BÃD·N¤£©ú½T¡B¨SªþÀɮ׮榡¡B¨S¦³°Q½×°ÝÃDªººA«×~~~~~~¥H¤W·R²ö¯à§U¡C

TOP

¦^´_ 7# stillfish00
§Ú¦³¸Õ¹L«Ü¦h¤èªk ¦]¤£¤F¸Ñ¤~¦bµo°Ý §Ú¦³¸Õ¹L¨Ò¦p
        Sub Test()
        Dim i As Long
        With ActiveSheet
            For i = .Cells(.Rows.Count, "B2:B").End(xlUp).Row To 1 Step -1
                If StrComp(.Cells(i, "B2:B").Text, Format(Date, "yyyy/mm/dd"), vbTextCompare) <> 0 Then .Rows(i).Delete Shift:=xlUp
            Next
        End With
    End Sub
¤£À´Äæ¦ì±qB2¶}©l¸ò¤é´Áªí¥Ü
ÁٽФj¤j«ü¾É
ÁÂÁÂ

TOP

¦^´_ 8# jerrystock

For i = .Cells(.Rows.Count, "B").End(xlUp).Row To 2 Step -1
    If StrComp(.Cells(i, "B").Text, Format(Date, "yyyy/mm/dd"), vbTextCompare) <> 0 Then .Rows(i).Delete Shift:=xlUp
Next
ªí¹F¤£²M¡BÃD·N¤£©ú½T¡B¨SªþÀɮ׮榡¡B¨S¦³°Q½×°ÝÃDªººA«×~~~~~~¥H¤W·R²ö¯à§U¡C

TOP

¦^´_ 9# stillfish00
·PÁ¤j¤j¦b¦Ê¦£¤¤¦h¦¸¦^ÂФp§Ìªº·M°Ý ¯u¤ßÁÂÁ±zªº«ü¾É ÁÂÁÂ^^

TOP

        ÀR«ä¦Û¦b : ¤@­Ó¤H¤£©È¿ù¡A´N©È¤£§ï¹L¡A§ï¹L¨Ã¤£Ãø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD