|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
Option Explicit
Sub test1()
Dim i&, n&, r&, objTable As Table, strRngText$
Application.ScreenUpdating = False
With ActiveDocument
For Each objTable In .Tables
With objTable
n = .Range.Cells.Count
For i = 1 To n
strRngText = Left(.Range.Cells(i).Range.Text, Len(.Range.Cells(i).Range.Text) - 2)
If IsNumeric(strRngText) Then
r = InStr(strRngText, ".")
If r Then
.Range.Cells(i).Range.Text = Mid(.Range.Cells(i).Range.Text, 1, r - 1)
End If
End If
Next i
End With
Next
End With
Application.ScreenUpdating = True
Beep
End Sub
|
评分
-
1
查看全部评分
-
|