乔山办公网我们一直在努力
您的位置:乔山办公网 > excel表格制作 > -怎么对excel去重复数据库,excel找重复数据

-怎么对excel去重复数据库,excel找重复数据

作者:乔山办公网日期:

返回目录:excel表格制作







用万能的VBA可以解决zd

编制代码如下
Sub 去除重复字符()

Dim I, J, K As Integer

Dim BJ As Integer

Dim s As String

Dim mya(1 To 100)

s = Cells(1, 1)

I = Len(s)

For J = 1 To I

mya(J) = Mid(s, J, 1)

Next J

s = mya(1)

For J = 2 To I

BJ = 0

For K = 1 To J - 1

If mya(J) = mya(K) Then

BJ = 1

Exit For

End If

Next K

If BJ = 0 Then

s = s + mya(J)

End If

Next J

Cells(1, 2) = s

End Sub

相关阅读

关键词不能为空

ppt怎么做_excel表格制作_office365_word文档_365办公网