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

[µo°Ý] ¾ã¦CªÅ¥Õ¦Û°ÊÁôÂÃ

[µo°Ý] ¾ã¦CªÅ¥Õ¦Û°ÊÁôÂÃ

¤j¤j¦n,

²z³f³æªº²Î¤@³W«h¡G
1) ¨C­Ó«È¤á²z³f³æ®æ¦¡¬Û¦P,¦ýGÄæ°Ó«~·|¦³¤£¦P
2) ²z³f³æ¦C¼Æ·|¨Ì«È¤á¤U³æ,¦Ó¦³©ÒÅܤÆ
3) ²z³f³æªº°Ó«~²M³æ,³£¦bB:M "«~¦W" & "¦X­p"¤§¶¡,¨Ã¹w¯d¤@¨ÇªÅ¥Õ¦C¼Æ
EX:
½d¨Òªº38:43¬°ªÅ¥Õ¦C,´N¦Û°ÊÁôÂÃ

½Ð°Ý¦p¦óÅýB:M "«~¦W" & "¦X­p"¤§¶¡,§¹¥þªÅ¥Õªº¦C¼Æ,¥i¥H¦Û°ÊÁôÂÃ?
µ{¦¡­n¥i¥H¦Û°Ê°»´úªÅ¥Õ¦C
²z³f³æ.rar (14.27 KB)

¦^´_ 1# PJChen

½Ð´ú¸Õ¬Ý¬Ý¡AÁÂÁÂ
Sub test()
Dim Arr, i%, j%, n%
Application.ScreenUpdating = False
Arr = Range("b1:m43")
For i = 3 To UBound(Arr)
    n = 0
    If Arr(i, 1) = "" Then
        For j = 1 To UBound(Arr, 2)
            If Arr(i, j) = "" Then n = n + 1
        Next
        If n = 12 Then Rows(i).EntireRow.Hidden = True
    End If
Next
Application.ScreenUpdating = True
End Sub

TOP

¦^´_ 2# samwang
±z¦n¡A
³o¸Ì¯à§_§ï¬°¡§°Ó«~¡¨¸ò¡§¦X­p¡¨¤§¶¡¡A
¤£­n¥Î«ü©w¹ê»Ú½d³ò¡H
Arr = Range("b1:m43")
³o¼Ë¤~¯à®M¥Î¨ì¦U­Ó«È¤áªº²z³f³æ·í¤¤¡C

TOP

¦^´_ 3# PJChen


³o¸Ì¯à§_§ï¬°¡§°Ó«~¡¨¸ò¡§¦X­p¡¨¤§¶¡¡A
¤£­n¥Î«ü©w¹ê»Ú½d³ò¡H
>> ¤£¦n·N«ä¡A«á¾Ç¤£¤F¸Ñ±z±o·N«ä¡A¥i§_»¡©ú¸Ô²Ó©ÎÁ|¨Ò¡AÁÂÁÂ

TOP

¦^´_ 3# PJChen

³o¸Ì¯à§_§ï¬°¡§°Ó«~¡¨¸ò¡§¦X­p¡¨¤§¶¡¡A
¤£­n¥Î«ü©w¹ê»Ú½d³ò¡H
>> °Ó«~¬O­þ­ÓÄæ¦ì?¦X­p¬O­þ­ÓÄæ¦ì
°²³]BÄæ~MÄæ¤S«ç»ò¤£¥Î«ü©w½d³ò
Arr = Range("b1:m43")
³o¼Ë¤~¯à®M¥Î¨ì¦U­Ó«È¤áªº²z³f³æ·í¤¤¡C
>> ³o¬q§Úªº²z¸Ñ¬O¥i¥H§ï¬°Arr = Range("b1:m" & [b65536].End(3).Row - 2)¡A¹ï¶Ü?

123Â^¨ú.PNG (46.31 KB)

123Â^¨ú.PNG

TOP

¥Î"«~¦W"Àˬd¬O§_ªÅ¥Õ, «~¦W¤¤¶¡ªºªÅ¥Õ¤£ºâ,
¥u§ì³Ì«á¤@µ§"«~¦W"¦Ü"¦X­p"¤§¶¡ªºªÅ¥Õ¦æ~

Sub ÁôÂêťզæ()
Dim R&, xR As Range, xE As Range, i&, j&, k%
Range("G:G").EntireRow.Hidden = False
R = [g65536].End(3).Row
For i = R To 1 Step -1
    Set xR = Cells(i, "g")
    If xR = "¦X­p" Then k = 1: Set xE = xR(0)
    If k = 0 Then GoTo i01
    If xR(0) <> "" Then
       If xR = "¦X­p" Then MsgBox "«~¦W¤w¶ñº¡, ¨S¦³ªÅ¥Õ¦æ": Exit Sub
       If xR(0) = "«~¦W" Then MsgBox "«~¦W¥þ³¡ªÅ¥Õ": Exit Sub
       Exit For
    End If
i01: Next i
Range(xR, xE).EntireRow.Hidden = True
End Sub

TOP

¦^´_ 5# samwang
§ï¦¨³o¼Ë,°õ¦æµ²ªGµL»~
Arr = Range("b1:m" & [b65536].End(3).Row - 2)

¦^´_ 6# ­ã´£³¡ªL
°õ¦æµ²ªGµL»~

·PÁ¤G¦ì,µ{¦¡°õ¦æµ²ªG,³£«Ü²z·Q¡I

TOP

        ÀR«ä¦Û¦b : §Ú­Ì­n°µ¦nªÀ·|ªºÀô«O¡A¤]­n°µ¦n¤º¤ßªºÀô«O¡C
ªð¦^¦Cªí ¤W¤@¥DÃD