+ Reply to Thread
Results 1 to 3 of 3

inserting a formula with VBA that has quotation marks

  1. #1
    Valued Forum Contributor luv2glyd's Avatar
    Join Date
    07-13-2008
    Location
    Seattle, WA, US
    MS-Off Ver
    Excel 2010
    Posts
    679

    inserting a formula with VBA that has quotation marks

    I'm attempting to isert the following formula into a cell via VBA:

    Please Login or Register  to view this content.
    but given an error I'm guessing due to ' symbol being used in the formula. How can I avoid this?

    Thank you
    Last edited by luv2glyd; 10-16-2010 at 06:12 PM.
    You either quit or become really good at it. There are no other choices.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,963

    Re: inserting a formula with VBA that has quotation marks

    The problem is the double quotes. The workaround below uses the character code for them so that the compiler won't try to pair them up with the string delimiter quotes at the beginning and end.
    Please Login or Register  to view this content.
    Ben Van Johnson

  3. #3
    Valued Forum Contributor luv2glyd's Avatar
    Join Date
    07-13-2008
    Location
    Seattle, WA, US
    MS-Off Ver
    Excel 2010
    Posts
    679

    Re: inserting a formula with VBA that has quotation marks

    Cool! Thank you. Now that I realize what the issue is, I was actually able to make it work by putting """" instead of "" - quadruple quotation marks in place of double.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1