Skip to content

Instantly share code, notes, and snippets.

@ateneva
Last active April 16, 2017 15:35
Show Gist options
  • Save ateneva/8b0c8b938b7d51ee9f52a10317a09f2a to your computer and use it in GitHub Desktop.
Save ateneva/8b0c8b938b7d51ee9f52a10317a09f2a to your computer and use it in GitHub Desktop.
Prevent numbers from showing up in scientific format
Sub preventscientific()
Dim Cell As Range
Dim textid As Variant
Dim newid As String
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'written by Angelina Teneva, September 2016
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
For Each Cell In ActiveSheet.Range("B2:B" & ActiveSheet.UsedRange.Rows.Count).SpecialCells(xlCellTypeVisible)
textid = Cell.Value
newid = "'" & textid
Cell.Value = newid
Next Cell
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment