|
发表于 2014-10-17 12:31
|
显示全部楼层
本楼为最佳答案
- Sub Macro1()
- Dim w(9), rng As Range, c As Range
- [cz1:cz10].ClearContents
- Set rng = Application.InputBox("请用鼠标选中数据区域", Type:=8)
- If Not Application.Intersect(Range("b388").CurrentRegion, rng) Is Nothing Then
- For Each c In rng
- s = c.Value
- If s <> "" Then w(s) = s
- Next
- For i = 0 To 9
- If w(i) <> "" Then n = n + 1: Cells(n, "cz") = w(i)
- Next
- End If
- End Sub
复制代码 |
|