Auto update of filters

P

Pec1909

I have two work books , data, datatype.
Data has column B as datatype, which is populated either 1 or 0 .
Datatype has an autofilter on column A (all 1). Cell
A2=if(data!b2=1,data!b1,"")

This works fine, until I modify the value in data!b2 and then change to
workbook datatype. It will still display Data!b2 data even if it is conflicts
with autofilter.

Question: How do i get the filter to auto update beween workbooks?
 
D

Dave Peterson

You have two worksheets...

Autofilters won't react to changes like this.

In fact, if you only had one worksheet and used data|filter|autofilter, then
changed a value right in that range, you'd have to reapply your criteria.
 
P

Pec1909

Dave,
Thanks, what I have investigated into and works, is that I have right
clicked on the tab and select view code and added the following code;

Option Explicit
Private Sub Worksheet_Activate()
Selection.AutoFilter Field:=1, Criteria1:="<>"

End Sub

this way every time I enter the worksheet the filter refreshers.

--
Everyone one wants to go to heven, but no one wants to die ;-) (Curits
Mayfield)


Dave Peterson said:
You have two worksheets...

Autofilters won't react to changes like this.

In fact, if you only had one worksheet and used data|filter|autofilter, then
changed a value right in that range, you'd have to reapply your criteria.
 
Top