Re: Attempting to use dependent checkboxes to autofilter data
That is a good start! If you can experiment with the code i sent you, you might find that if you select omit cancelled and leave complete un checked, you would see all including complete but not cancelled (and of course vise versa for complete). If you want to see everything then leave omit and show unchecked for both cancelled and complete. If you only want to see cancelled then click show for cancelled (and vice versa for complete). I am not sure you need to add the Include button to accomplish the task.
If CriteriaOne = "" Then
If CriteriaTwo = "" Then
Selection.AutoFilter Field:=1 ' do this if no Show/Omit selections made
Else
Selection.AutoFilter Field:=1, Criteria1:=CriteriaTwo & "Complete" ' do this if you only selected Complete option
End If
Else
If CriteriaTwo = "" Then
Selection.AutoFilter Field:=1, Criteria1:=CriteriaOne & "Cancelled" ' do this if you only selected Cancelled option
Else
If CriteriaOne = "=" And CriteriaTwo = "=" Then
Selection.AutoFilter Field:=1, Criteria1:=CriteriaOne & "Cancelled", Operator:=xlOr, Criteria2:=CriteriaTwo & "Complete" ' do this if you selected Show for both Cancelled and Complete
Else
Selection.AutoFilter Field:=1, Criteria1:=CriteriaOne & "Cancelled", Operator:=xlAnd, Criteria2:=CriteriaTwo & "Complete" ' do this if you made a Show selection on one and an Omit selection on the other
End If
End If
End If
Display More
I added some comments to the AutoFilter setup lines above. They cover pretty much every option that makes logical sense. Try the various options with the example I sent and see if they don't do the job. I am signing off for the night.