nnsea 发表于 2023-10-26 14:37:28

多表求不重复值VBA


Sub test()
Set d = CreateObject("scripting.dictionary")
For Each sh In Sheets
    c = sh.Name
    If sh.Name <> "品名" Then

      arr = sh.Range("a1:a" & sh.Cells(Rows.Count, 1).End(xlUp).Row)
      For Each Rng In arr
            d(Rng) = ""
      Next
    End If
Next
.Resize(d.Count) = Application.Transpose(d.keys)
End Sub
页: [1]
查看完整版本: 多表求不重复值VBA