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

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

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
 

Watch MrExcel Video

Forum statistics

Threads
1,133,562
Messages
5,659,558
Members
418,507
Latest member
Jsejms

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