一个单元格内录入了两个手机号码 ,一部分相同 一部分不同,如何将相同的只保留一个呢?可以通过下面的VBA删除 6为删除的列
- <P>Sub deldata()
- Dim i As Integer
- For i = 1 To 8000 </P>
- <P> If Left(Cells(i, 6), 11) = Right(Cells(i, 6), 11) Then
- Cells(i, 6).Select
- MsgBox Left(Cells(i, 6), 11) & "|" & Right(Cells(i, 6), 11)
- Cells(i, 6).Value = Left(Cells(i, 6), 11)
- End If
- Next
- End Sub
- </P>
复制代码 |
|
hessen