Results 1 to 3 of 3

Thread: Excel file?

  1. #1

    Thread Starter
    Member
    Join Date
    Apr 2000
    Posts
    48

    Question

    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.

  2. #2
    Lively Member quadoc's Avatar
    Join Date
    Jan 1999
    Location
    Ga, USA
    Posts
    83
    Surely someone out there know how to do this?
    VB6(SP4), QB4.5, PDS7.0, IBM-U2

  3. #3
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    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
  •  



Click Here to Expand Forum to Full Width