Tables("表a").filter = "编号 in ('" & str.replace(",", "','") & "')"
模糊查询
Dim str As String = "1,2,3,4,5" Dim filter As String = "1=2" For Each s As String In str.split(",") filter &= " or 编号 like '%" & s & "%'" Next msgbox(filter) Tables("表a").filter = filter