34,590
社区成员
发帖
与我相关
我的任务
分享
Public Sub AppendQuote()
Dim sh As Worksheet
Dim iRowsCount As Integer, iColCount As Integer
Dim i As Integer, j As Integer
Set sh = Sheets(1)
iRowsCount = sh.UsedRange.Rows.Count
iColCount = sh.UsedRange.Columns.Count
Application.ScreenUpdating = False
Application.EnableEvents = False
Application.Calculation = xlCalculationManual
For i = 1 To iRowsCount
For j = 1 To iColCount
If Len(Trim(sh.Cells(i, j))) > 0 Then
sh.Cells(i, j) = "'" & CStr(sh.Cells(i, j))
End If
Next j
Next i
Application.EnableEvents = True
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
End Sub
Public Sub AppendQuote()
Dim sh As Worksheet
Dim iRowsCount As Integer, iColCount As Integer
Dim i As Integer, j As Integer
Set sh = Sheets(1)
iRowsCount = sh.UsedRange.Rows.Count
iColCount = sh.UsedRange.Columns.Count
For i = 1 To iRowsCount
For j = 1 To iColCount
If Len(Trim(sh.Cells(i, j))) > 0 Then
sh.Cells(i, j) = "'" & CStr(sh.Cells(i, j))
End If
Next j
Next i
End Sub