No filter rows

D

Doug

I am needing to select rows that I don't want to be filtered out when I am
selecting filter parameters in various columns of my spreadsheet.
Is it possible to insert check boxes for each row to the left of my data so
that all that are checked will be overlooked during filtering data?
 
J

Joel

Yes. the check boxes have a property LinkedCell which will put a true or
false on the worksheet to indicate if the box is checked. You can then filer
on the true and False Values

Make the column the same for each check box and make the row the row where
the check box appears.
 
D

Doug

How can I make the check boxes a part of the cell without placing one into
each individually? Also am I using the Activex or form controls?
 
J

Joel

YOuca use either ActiveX or form control. The check boxes like all controls
and pictures are not part of the cell structure and sits ontop of the
worksheet. You either have to place each check box manually or write a macro
to add each check box.
 
J

Joel

something like this


Sub Macro1()
'
'
LinkedColumn = "C"
BoxColumn = "X"
BoxLeft = Range(BoxColumn & "1").Left
Boxwidth = Range(BoxColumn & "1").Width

'
For RowCount = 3 To 1000
BoxTop = Range(BoxColumn & RowCount).Top
BoxHeight = Range(BoxColumn & RowCount).Height

Set bx = ActiveSheet.CheckBoxes.Add( _
Left:=BoxLeft, Top:=BoxTop, Width:=Boxwidth, Height:=BoxHeight)

bx.LinkedCell = LinkedColumn & RowCount
Range(LinkedColumn & RowCount) = False
Next RowCount
End Sub
 
D

Doug

I just typed in the correct columns for which I am using. It writes "false"
in all of the Q column. How can I have it link to the Q column without
changing the cell values to false?

Sub Checkboxes()
'
'
LinkedColumn = "Q"
BoxColumn = "A"
BoxLeft = Range(BoxColumn & "1").Left
Boxwidth = Range(BoxColumn & "1").Width

'
For RowCount = 3 To 1000
BoxTop = Range(BoxColumn & RowCount).Top
BoxHeight = Range(BoxColumn & RowCount).Height

Set bx = ActiveSheet.Checkboxes.Add( _
Left:=BoxLeft, Top:=BoxTop, Width:=Boxwidth, Height:=BoxHeight)

bx.LinkedCell = LinkedColumn & RowCount
Range(LinkedColumn & RowCount) = False
Next RowCount
End Sub
 
D

Doug

That part worked great Joel, but now how do I make it so that by checking the
box it won't filter out that row?
 
D

Doug

That part worked great Joel, but now how do I make it so that by checking the
box it won't filter out that row?
 
D

Doug

This did put the check boxes in for me, but it does not work. Now I have 1000
check boxes that I am not sure how to delete unless I do them each one at a
time.
 

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

Top