Adding Apostrophe in every field in particular column for excel
I'm going to suggest the non-obvious. There is a fantastic (and often under-used) tool called the Immediate Window in Visual Basic Editor. Basically, you can write out commands in VBA and execute them on the spot, sort of like command prompt. It's perfect for cases like this.
Press ALT+F11 to open VBE, then Control+G to open the Immediate Window. Type the following and hit enter:
for each v in range("K2:K5000") : v.value = "'" & v.value : next
And boom! You are all done. No need to create a macro, declare variables, no need to drag and copy, etc. Close the window and get back to work. The only downfall is to undo it, you need to do it via code since VBA will destroy your undo stack (but that's simple).
The way I'd do this is:
- In Cell L2, enter the formula
="'"&K2
- Use the fill handle or
Ctrl+D
to fill it down to the length of Column K's values. - Select the whole of Column L's values and copy them to the clipboard
- Select the same range in Column K, right-click to select 'Paste Special' and choose 'Values'