Hirdetés

Új hozzászólás Aktív témák

  • Delila_1

    veterán

    válasz oke #35639 üzenetére

    Próbáld ki ezt:

    Sub mm()
    Dim sor As Long, usor As Long, WF As WorksheetFunction
    Dim ter As Range, CV As Range

    Set WF = Application.WorksheetFunction
    If WF.CountIf(Columns(7), "Alma*") + WF.CountIf(Columns(7), "Körte*") _
    + WF.CountIf(Columns(7), "Narancs*") > 0 Then
    usor = Range("A" & Rows.Count).End(xlUp).Row
    ActiveSheet.Range("$A$1:$K$" & usor).AutoFilter Field:=10, Criteria1:="-"

    usor = Range("J" & Rows.Count).End(xlUp).Row
    Set ter = Range("G2:G" & usor).SpecialCells(xlCellTypeVisible)

    For Each CV In ter
    If CV <> "Alma*" And CV <> "Körte*" And CV <> "Narancs*" Then _
    Rows(CV.Row).Delete Shift:=xlUp
    Next
    usor = Range("J" & Rows.Count).End(xlUp).Row
    ActiveSheet.Range("$A$1:$K$" & usor).AutoFilter Field:=10
    End If
    End Sub

Új hozzászólás Aktív témák