PC Review


Reply
Thread Tools Rate Thread

How do I get a filter to "UPDATE" the rows selected?

 
 
Phillips
Guest
Posts: n/a
 
      18th Nov 2003
Hey there!
I am using Excel 2002 and I have a speadsheet that has prices in it.

If I have the filter set to (the filter criteria is much more complex than
this though) prices for items that cost >$5.00.

Of I change an item to 4.59, it should not be seen. How can I get it to
re-update the rows shown, with out releaseing the filter and resetting it?
Is there something like refresh.filter or anything like that?

Thanks
Phil


 
Reply With Quote
 
 
 
 
Don Guillett
Guest
Posts: n/a
 
      18th Nov 2003
AFAIK you must release and reset but a macro with a worksheet_change event
could trigger this for you so that it would happen automatically.

--
Don Guillett
SalesAid Software
(E-Mail Removed)
"Phillips" <Phillips*NOSPAM*@RecycledReefs.com> wrote in message
news:g4eub.229720$Fm2.229809@attbi_s04...
> Hey there!
> I am using Excel 2002 and I have a speadsheet that has prices in it.
>
> If I have the filter set to (the filter criteria is much more complex than
> this though) prices for items that cost >$5.00.
>
> Of I change an item to 4.59, it should not be seen. How can I get it to
> re-update the rows shown, with out releaseing the filter and resetting it?
> Is there something like refresh.filter or anything like that?
>
> Thanks
> Phil
>
>



 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      18th Nov 2003
I forgot to mention that you should NOT post in all ngs as it wastes the
time. However, if you must, the way you did it is best.

--
Don Guillett
SalesAid Software
(E-Mail Removed)
"Phillips" <Phillips*NOSPAM*@RecycledReefs.com> wrote in message
news:g4eub.229720$Fm2.229809@attbi_s04...
> Hey there!
> I am using Excel 2002 and I have a speadsheet that has prices in it.
>
> If I have the filter set to (the filter criteria is much more complex than
> this though) prices for items that cost >$5.00.
>
> Of I change an item to 4.59, it should not be seen. How can I get it to
> re-update the rows shown, with out releaseing the filter and resetting it?
> Is there something like refresh.filter or anything like that?
>
> Thanks
> Phil
>
>



 
Reply With Quote
 
Debra Dalgleish
Guest
Posts: n/a
 
      18th Nov 2003
YOu can use a worksheet_Change event, similar to the following. The code
is stored on the worksheet module of the sheet that contains the filter
(right-click the sheet tab, and choose View Code)

'==================================
Private Sub Worksheet_Change(ByVal Target As Range)
Dim i As Integer
Dim filt As Filter
Dim Op As Long
Dim rng As Range
Dim ws As Worksheet
Set ws = ActiveSheet
If ws.FilterMode = False Then
Exit Sub
End If
Set rng = ws.AutoFilter.Range

If Intersect(Target.EntireColumn, rng) Is Nothing Then
Exit Sub
Else
i = Target.Column
If Not ws.AutoFilter.Filters(i).On Then
'do nothing
Else
Set filt = ws.AutoFilter.Filters(i)
On Error Resume Next
Op = filt.Operator
If Op = 0 Then
Range("A1").AutoFilter Field:=i, _
Criteria1:=filt.Criteria1
Else
Range("A1").AutoFilter Field:=i, _
Criteria1:=filt.Criteria1, Operator:=Op, _
Criteria2:=filt.Criteria2
End If

End If
End If

End Sub
'==================================

Phillips wrote:
> Hey there!
> I am using Excel 2002 and I have a speadsheet that has prices in it.
>
> If I have the filter set to (the filter criteria is much more complex than
> this though) prices for items that cost >$5.00.
>
> Of I change an item to 4.59, it should not be seen. How can I get it to
> re-update the rows shown, with out releaseing the filter and resetting it?
> Is there something like refresh.filter or anything like that?



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Q: Auto filter "selected" color =?Utf-8?B?TWFyaw==?= Microsoft Excel Misc 1 5th Feb 2006 03:07 PM
counting selected rows among those returned as "TRUE" by an array sum formula upstate_steve Microsoft Excel Worksheet Functions 4 9th Apr 2004 06:20 PM
How do I get a filter to "UPDATE" the rows selected? Phillips Microsoft Excel Misc 3 18th Nov 2003 02:04 AM
How do I get a filter to "UPDATE" the rows selected? Phillips Microsoft Excel Worksheet Functions 3 18th Nov 2003 02:04 AM
How do I get a filter to "UPDATE" the rows selected? Phillips Microsoft Excel Programming 3 18th Nov 2003 02:04 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:17 PM.