How to Add/insert Apostophe In front of numbers in Excel?
Insert / Add Apostrophe In Front Of Numbers With VBA Code
The following simple code may help you to insert apostrophe before each number in a selection, please do as follows:
1. Select the range of numbers that you want to add the apostrophe.
2. Hold down the ALT + F11 keys to open the Microsoft Visual Basic for Applications window.
3. Then click Insert > Module, and paste the following code in the Module window.
VBA code: Insert apostrophe in front of numbers at once:
1 2 3 4 5 6 | Sub Addapostrophe()
For Each cell In Selection
cell.Value = "'" & cell.Value
Next cell
End Sub
|
4. After pasting the code, then press F5 key to run this code, and the apostrophe has been inserted in front of the numbers at once.
https://www.extendoffice.com/documents/excel/3356-excel-insert-leading-apostrophe.html