Skip to content

Instantly share code, notes, and snippets.

@ndthanh
Created July 22, 2017 14:08
Show Gist options
  • Select an option

  • Save ndthanh/52e65f3459d9e6cb262f4440e43e10c5 to your computer and use it in GitHub Desktop.

Select an option

Save ndthanh/52e65f3459d9e6cb262f4440e43e10c5 to your computer and use it in GitHub Desktop.
Sub remove_Apostrophe()
'Updateby20150521
Dim rng As Range
Dim WorkRng As Range
On Error Resume Next
xTitleId = "Hoc Excel Online"
Set WorkRng = Application.Selection
Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8)
Set WorkRng = WorkRng.SpecialCells(xlCellTypeConstants, xlNumbers)
For Each rng In WorkRng
If Not rng.HasFormula Then
rng.Formula = rng.Value
End If
Next
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment