Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Address = "$C$1" Then
Cancel = True
Call FilterAreaChk
If Ur.SpecialCells(xlCellTypeVisible).Count = Ur.Count Then
Ur.AutoFilter Field:=3, Criteria1:="<>完成"
Else
Ur.AutoFilter Field:=3
End If
End If
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
With Target.Item(1)
If .Column <> 3 Or .Row = 1 Or .Value <> "完成" Then Exit Sub
Call FilterAreaChk
Ur.AutoFilter Field:=3, Criteria1:="<>完成"
End With
End Sub
Sub FilterAreaChk()
If Me.AutoFilterMode = False Then
Range([A1:C1], Me.UsedRange).AutoFilter
End If
Set Ur = Me.AutoFilter.Range
End Sub