Can I format to always AutoFilter specific cells

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a column of 15 cells that each contain an "IF" function. When the
value is FALSE, I have it printing a blank cell. I can do an auto filter to
remove the "blank" cells but need to have it saved on the worksheet so it
will automaticall filter if the value of any of these cells changes. If you
have any suggestions or solutions I would certainly appreciate it.
Thanks in advance for your assistance,
Beverly
 
One way is to tie into that worksheet's calculation event.

Rightclick on the worksheet tab that should have that behavior. Select view
code and paste this in:

Option Explicit
Private Sub Worksheet_Calculate()

With Me
If .AutoFilterMode = False Then
'autofilter arrows have been removed
Else
If .FilterMode Then
.ShowAllData
End If
Application.EnableEvents = False
.AutoFilter.Range.AutoFilter field:=7, Criteria1:="<>"
Application.EnableEvents = True
End If
End With

End Sub

(Change the field:=7 to whatever column you need (1 is the first column of the
filtered range).)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top