How can you add an apostrophe in every field in an Excel spreadsheet without individually typing it in? I have got like 5k fields
This question is related to
excel
excel-2007
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).
i use concantenate. works for me.
More universal can be: for each v Selection : v.value = "'" & v.value : next and selecting range of cells before execution
Source: Stackoverflow.com