vba去掉单元格中的'
发布网友
发布时间:2024-05-14 17:59
我来回答
共1个回答
热心网友
时间:2024-06-01 11:13
如果前面有"'"符号,系统默认为文本格式,宏代码如下:
Sub deleteStr()
For i = 1 To 2
myRow = Range(Cells(65536, i), Cells(65536, i)).End(xlUp).Row
For j = 1 To Range(Cells(65536, i), Cells(65536, i)).End(xlUp).Row
myValue = Cells(j, i)
If Application.IsText(Cells(j, i)) = True Then
Cells(j, i) = myValue
End If
Next j
Next i
End Sub
你试试行不行