seraphinaex
New Member
- Joined
- Jan 23, 2018
- Messages
- 3
Hi everyone,
I've spent two days using my Google-fu trying to find an answer, but I'm stumped.
I have a spreadsheet that I'm using to monitor the progress of a number of projects, sort of Gantt chart-style. The projects are listed down the rows and the months of the year are the columns. Each month, the projects are given a rating (red, green, amber) based on their progress or they're left blank (transparent) if they haven't started/have finished.
I'm trying to create a button for each month of the year that will filter out the projects that haven't started or have finished, to make it easier to focus on the active projects. I thought the easiest way to achieve this was to create an autofilter that would hide any cells that are transparent. However, I've tried lots of variations of things and haven't been able to make it work.
My current version, which just hides everything in the spreadsheet, is:
Can anyone suggest another way to filter out the transparent cells? Thank you in advance, from a VBA newbie.
I've spent two days using my Google-fu trying to find an answer, but I'm stumped.
I have a spreadsheet that I'm using to monitor the progress of a number of projects, sort of Gantt chart-style. The projects are listed down the rows and the months of the year are the columns. Each month, the projects are given a rating (red, green, amber) based on their progress or they're left blank (transparent) if they haven't started/have finished.
I'm trying to create a button for each month of the year that will filter out the projects that haven't started or have finished, to make it easier to focus on the active projects. I thought the easiest way to achieve this was to create an autofilter that would hide any cells that are transparent. However, I've tried lots of variations of things and haven't been able to make it work.
My current version, which just hides everything in the spreadsheet, is:
Code:
Private Sub CommandButton14_Click() Range("AprilStart:AprilEnd").AutoFilter Field:=1, Criteria1:="Interior.ColorIndex <> xlNone", VisibleDropDown:=False
End Sub
Can anyone suggest another way to filter out the transparent cells? Thank you in advance, from a VBA newbie.