Private Sub CommandButton1_Click()
Dim c As Long
With Range("B1:B999").CurrentRegion
.Replace What:="'", Replacement:=vbNullString, LookAt:=xlPart
End With
Range("B1:B999").NumberFormat = "@"
End Sub
答案 0 :(得分:0)
您的问题尚不清楚,但也许您正在寻找类似的内容:
Dim ws as Worksheet
Set ws = ActiveWorkbook.Worksheet("NAME HERE")
Dim rng as range
Dim strInput as string, strOutput as string
For each rng in ws.columns(2).rows("1:999")
strInput = ws.Columns(2).Rows(rng.Row)
strOutput= Replace(strInput , "'", "")
ws.Columns(2).Rows(rng.Row) = strOutput
Next rng