troubleshooting Question

Auto Filter with VBA based on a Range of Cells

Avatar of Lennon Gary
Lennon GaryFlag for United States of America asked on
VBAMicrosoft ExcelMicrosoft Office
3 Comments2 Solutions115 ViewsLast Modified:

Im currently looking for a way to accomplish my task with VBA. I would want to use auto filter based on a range of cells. I have my file attached for use. There are two tabs (data and lookup_value). The data tab has the raw data and the lookup_value has the range of cell I want to be filtered from the raw data.

Example: DATA tab

Label1      Label2      Label3       Label4
1      James      North        $3,400.00
2      Peter      South       $32,400.00
3      Andrew      West       $23,000.00
4      Sam      South       $12,000.00
5      Job              West       $2,300.00
6      Josiah      South       $12,000.00
7      Law        West       $23,000.00
8      Little      South       $45,000.00
9      William      West       $56,900.00
10      David      South       $432,000.00
11      Farai      West       $3,300.00
12      Gary      South       $334,400.00
13      Henry      West       $21,590.00
14      Kevin      South       $231,100.00
15      Katt              West       $23,120.00
16      Leon      South       $32,459.00
17      Lennon      West       $98,554.00
18      Eric              North        $349,321.00
19      Elliot      North        $34,332.00

In the lookup_value, i have a pivot table with LABEL1 in the row label. Some of the values are selected and I want the VBA to lookup the values selected from the pivot table and reflect that on the DATA tab. I also want a filter for LABEL2 to the ones equal to "North".

Your assistance is greatly appreciated.

Lennon G
Join our community to see this answer!
Unlock 2 Answers and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros