|
此文章由 zsuzzy 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 zsuzzy 所有!转贴必须注明作者、出处和本声明,并保持内容完整
代码如下。。
---------------------------------------------
Sub Macro2()
'
'
Range("A:A").Select
Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, SortMethod _
:=xlPinYin, DataOption1:=xlSortNormal
i = 1
a = Cells(i, 1)
Cells(i, 2) = Cells(i, 1)
Do While Cells(i, 1) <> 0
If a <> Cells(i, 1) Then
a = Cells(i, 1)
Cells(i, 2) = Cells(i, 1)
End If
i = i + 1
Loop
Range("B:B").Select
Selection.Sort Key1:=Range("B1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, SortMethod _
:=xlPinYin, DataOption1:=xlSortNormal
End Sub
----------------------------------------------------
下面是结果,数据我没全部拷完。应该不会有问题。
3853660
3853670
3853680
3853690
3853700
3853710
3853720
3853730
3853740
3853750
3853760
3853770
3853780
3853790
3853800
3853810
3853820
3853830
3853840
3853850
3853860
[ 本帖最后由 zsuzzy 于 2011-11-12 15:06 编辑 ] |
评分
-
查看全部评分
|