Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2013
    Posts
    7

    Unanswered: Add quotes around Execl output from Macro

    Greetings,

    I have this line in a macro
    Cells(584, 2).Value = Cells(16, 1).Value

    It represents a drawing title that I import from a text file.
    Since a particular drawing title has spaces in it, I need to add quotes around the exported name.

    So the name at Cells(16, 2) is CUSTOM D SIZE DRAWING

    It needs to be put in Cells(584, 2) as "CUSTOM D SIZE DRAWING"

    Thanks for any help

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    = chr(34) & cells(16,1).text & chr(34)

    Dunno if excel has a text and value property
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Oct 2013
    Posts
    7

    Solved

    Quote Originally Posted by healdem View Post
    = chr(34) & cells(16,1).text & chr(34)

    Dunno if excel has a text and value property
    healdem,

    I accidentally left it as (16,1).value instead of (16,1).text because I wasn't paying attention. Otherwise I changed everything exactly as you wrote and it is working perfectly.

    You saved me a lot of headaches and I would give you a gold star sticker if I could.

    Thanks for the help.

    Doug

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •