|
-
Sep 15th, 2000, 11:43 AM
#1
Thread Starter
Member
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.
-
Sep 15th, 2000, 03:21 PM
#2
Lively Member
Surely someone out there know how to do this?
VB6(SP4), QB4.5, PDS7.0, IBM-U2
-
Sep 15th, 2000, 03:34 PM
#3
Frenzied Member
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:
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
See if that works. I don't have Excel VBA here, so I'm working from (a slightly rusty) memory.
Harry.
"From one thing, know ten thousand things."
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|