VBA to Filter referenced Table

mxalex229

New Member
Joined
Feb 9, 2021
Messages
11
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi All!
I'm an envious excel learner, hoping to learn from a tricky problem I want to solve.
I want to be able to filter (table 1) based on a double click in a cell (table 2) that has a function that references the columns in (table 1).

This way when I am looking at table 2 I can double click the cell C3 on table2 and it will filter table 1 down to local 1, error1. Can this be done? Thank you all so much in advance, I'm really excited to learn this VBA myself!

Sample.xlsx
ABCDEFGHI
1LocalError Counterror1error2error3error4error5error6error7
2121100000
3221100000
4320010100
5420001001
6510000010
7Total92211111
Worksheet 2
Cell Formulas
RangeFormula
B2:B6B2=COUNTIF('Worksheet 1'!A:A,[@Local])
C2:I6C2=COUNTIFS(Table1[[#All],[local]],[@Local],Table1[[#All],[Error]],C$1)
B7B7=SUBTOTAL(109,[Error Count])
C7C7=SUBTOTAL(109,[error1])
D7D7=SUBTOTAL(109,[error2])
E7E7=SUBTOTAL(109,[error3])
F7F7=SUBTOTAL(109,[error4])
G7G7=SUBTOTAL(109,[error5])
H7H7=SUBTOTAL(109,[error6])
I7I7=SUBTOTAL(109,[error7])
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
This is table 1
Sample.xlsx
ADFGIJKLM
1localInterface Message IDService DateCreatedDays AgedTeamErrorSub-error Charges
21130962511/1/19001/2/1900many1error1sb210
32131000901/2/19001/3/1900a lot2error2sb115
43131110691/3/19001/4/1900very many3error3sb35
54131195561/4/19001/5/1900old4error4sb110
65131236121/5/19001/6/1900super old1error6sb115
72131243601/6/19001/7/1900place holder3error1sb25
83131386291/7/19001/8/1900ph4error5sb110
94131400321/8/19001/9/1900od5error7sb25
101131468161/9/19001/10/1900c2error2sb315
Worksheet 1
 
Upvote 0

Forum statistics

Threads
1,214,872
Messages
6,122,026
Members
449,061
Latest member
TheRealJoaquin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top