Macro to look up changed target on another sheet within same workbook

Hare

New Member
Joined
Oct 9, 2008
Messages
14
Hi, below I have a macro that runs from within the one sheet which looks at a data validation list selection and does the autofilter.

However I have now expanded my workbook and want all data entry to be done on a different worksheet while the sheet that currrently holds this macro show only the summary.

Put simply, I want to do the data validation selection in the "Data Entry" tab and have the filter work on the "Summary" tab. How do I edit this macro to read target on "Data Entry" tab?

Private Sub Worksheet_Change(ByVal Target As Range)
If Application.Intersect(Target, Range("BusinessArea")) Is Nothing Then Exit Sub
On Error Resume Next
ActiveSheet.ShowAllData
Range("B20:H883").AdvancedFilter Action:=xlFilterInPlace, CriteriaRange:= _
Range("Criteria"), Unique:=False
End Sub

Thanks,

Hare
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

Hare

New Member
Joined
Oct 9, 2008
Messages
14
Hi just wondering if anyone does have an idea on how to fix this.
Pls let me know.
 

lenze

Legend
Joined
Feb 18, 2002
Messages
13,690
Untested, but this should work. with the code in the Data Entry module
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Application.Intersect(Target, Range("BusinessArea")) Is Nothing Then Exit Sub
On Error Resume Next
Dim ws As Worksheet
Set ws = Sheets("Summary")
ws.ShowAllData
ws.Range("B20:H883").AdvancedFilter Action:=xlFilterInPlace, CriteriaRange:= _
ws.Range("Criteria"), Unique:=False
End Sub
 

Forum statistics

Threads
1,176,401
Messages
5,902,844
Members
435,001
Latest member
ahsanali32

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
Top