Last active
April 16, 2017 15:35
-
-
Save ateneva/8b0c8b938b7d51ee9f52a10317a09f2a to your computer and use it in GitHub Desktop.
Prevent numbers from showing up in scientific format
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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