Search code snippets, questions, articles...

murata vba select cells after autofilter

Sub Macro4()
    Dim R As Range
    Range("A1").AutoFilter 1, "田中"
    With Range("A1").CurrentRegion.Offset(1, 0)
        '各行 in 表示されている全ての行
        For Each R In .Resize(.Rows.Count - 1).SpecialCells(xlCellTypeVisible).Rows
            Debug.Print R.Address
            If R.Cells(1, 3) > 300 Then
            MsgBox R.Cells(1, 2)
            End If
        Next R
    End With
End Sub
Was this helpful?
Programming Feeds
Learn something new everyday on Devsheet