sorry 岩岩身邊冇電腦
見到你覆就講左先
比個sample你
唔想幫可以無視我
https://drive.google.com/file/d/1eRTTMB539-AlX7zJQ5USgG0eZ0_BzKPM/view?usp=sharing
Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Selection.Count = 1 Then
If Not Intersect(Target, Range("A2:C100")) Is Nothing Then '呢度改個Range, 暫定A2:C100
'呢度寫filtering Macro
End If
End If
End Sub
Range("E:E").Clear
Dim TR As Long
TR = Cells(Rows.Count, 1).End(xlUp).Row
Dim i, s As Integer
s = 1
For i = 1 To TR
If Cells(i + 1, 1) = Range("D2") Then
Cells(s + 1, 5) = Cells(i + 1, 2)
s = s + 1
End If
Next i