Can I format to always AutoFilter specific cells
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).) BCantrell wrote: 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 -- Dave Peterson |
All times are GMT +1. The time now is 11:40 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com