I have an Excel file with two columns. I want to insert a quote in front of all the cell values. Is there a quick way to do this in Excel? I don't want to manually go into each cell and insert the quote.
Printable View
I have an Excel file with two columns. I want to insert a quote in front of all the cell values. Is there a quick way to do this in Excel? I don't want to manually go into each cell and insert the quote.
Surely someone out there know how to do this?
Make a macro to do it is the quickest way. Just go into VB editor and add a procedure in a module or something, with code like this:
See if that works. I don't have Excel VBA here, so I'm working from (a slightly rusty) memory.Code:Dim ws As Worksheet
Dim rg as Range
Set ws = ActiveWorkbook.Worksheets("your_sheet_name")
Set rg = ws.Range("A1", bottom_right_cell)
For x = 1 to rg.Columns 'Might be columncount or something, can't remember
For y = 1 to rg.Rows 'Same thing here
ws.Cells(x,y) = chr(34) & ws.Cells(x,y)
Next y
Next X
Set rg = Nothing
Set ws = Nothing