Checkbox Control / How to filter ?


Posted by Cathy on July 08, 2001 7:40 PM

Hello,

I have a file with 1000 lines. In the first row, there
is a checkbox to determine if the line has been checked or not.

How can you filter the checbox that have been clicked and the ones that have not been clicked ? I used "filter option" but it does not work...
Help !

Thanks



Posted by Damon Ostrander on July 09, 2001 4:20 PM

Hi Cathy,

Filters only work on cell contents, not on controls, which are objects that can be made lie on top of cells. To use the filter you must assign each checkbox to cell cell to the row or column you want to filter. The value of that cell will then be TRUE or FALSE depending on the checkbox, and these will appear as filter values.

If your checkboxes are embedded ActiveX controls (i.e., you got them from the Controls Toolbar), assign the checkbox to a cell using the LinkedCell property. If the checkboxes are Forms controls (i.e., from the Forms toolbar) then assign the checkbox to a cell by right-clicking on the checkbox, select Format Control... and on the Control Tab enter the Cell Link.

The difficult part here is that (I assume you have 1000 checkboxes) you must do this cell assignment 1000 times, which is pretty tedious. If you would like to follow up to this message with some information about what column (or row) the cells are in that you want assigned to the checkboxes, whether you have named the checkboxes (or just let Excel assign the names as you created them), what the names of the first and last checkboxes are (the name appears in the name box just above the top left cell on the worksheet when the checkbox is selected), and whether you used Forms or ActiveX checkboxes, I will post a little macro that you can use to assign them to consecutive cells.

Happy filtering.

Damon