We help IT Professionals succeed at work.

Excel VBA Filter Table column by certain cell value

Murray Brown
Murray Brown asked
on
Hi

What VBA code would I use to filter an Excel table (exported from SharePoint) by the cell
value "ABC Ltd" in a column with the column header "Companies"

Thanks
Comment
Watch Question

Data Analyst
Commented:
Activesheet.Range("A1:E1").AutoFilter Field:="Companies", Criteria1:="ABC Ltd"

Open in new window


This assumes your data headers are in the 1st 5 columns of the active worksheet (Columns 'A' through 'E')
Murray BrownASP.net/VBA/VSTO Developer

Author

Commented:
Thanks very much