Public Sub cfzzj007()
Dim CXrng As Range, XRrng As Range
Set XRrng = Range("H3")
For Each CXrng In Range("A2:A" & Range("A65536").End(xlUp).Row)
If CXrng.Value <> "" And CXrng.Value = Range("I1").Value Then
XRrng.Resize(1, 5).Value = CXrng.Resize(1, 5).Value
Set XRrng = XRrng.Offset(1, 0)
End If
Next
End Sub
在H3输入=INDEX($A$1:$E$8,MATCH($I$1,$A$1:$A$8,0),MATCH(H2,$A$1:$E$1,0))
然后右拉就行了