In Excel2010 I have created a table of X items on rows and features of these items on Y columns. One of the features is the Application Area and I want to filter the items based on the application area type. The difficulty is the items on the table have multiple application areas, so I cannot use the simple filter function of excel.
I came up with an idea to have n check-boxes (3 for this example) and assign the output of each check-box to a different cell, e.g. A10, B10, C10. I assign relevant values to OR functions for each item in an extra column, e.g. column F. So, for example, when I check the application area A the items 1 and 3 have TRUE in the column F and I can use this column to filter the table by selecting TRUE in the auto filter function. See the picture for better understanding.
The problem is that the auto filter function does not refresh automatically after I change the status of a check box. Every time I have to reapply the filter in data ribbon. Online I found this piece of VBA code to have an auto refresh feature in the active sheet.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 8 Then
ActiveSheet.AutoFilter.ApplyFilter
End If
End Sub
Now, this code does work and the filter is reapplied, if I actively go to one of the cells in the F column and edit the cell to TRUE or FALSE manually. If I change a cell value in the F using the check box, the auto refresh does not work.
What is the difference between changing a cell value by typing the value and pressing ENTER and using a check box?
BTW, the check box is a FORM CONTROLS type, not ACTIVEX.
Any help would highly be appreciated. Thanks!