+ Reply to Thread
Results 1 to 5 of 5

Another problem copying formula to column using VBA

  1. #1
    Registered User
    Join Date
    09-12-2012
    Location
    DC
    MS-Off Ver
    Excel 2007
    Posts
    24

    Another problem copying formula to column using VBA

    Having problems copying a formula into a column. The first formula in the code below copied fine into column A. Getting errors when I added another formula to copy into column B. Not sure why. Do I need to change the formulas in column A to values first before putting the formula into column B that references column A? I tested the formula and it works fine when I manually copy it in to a cell in column B. Thanks!!

    Please Login or Register  to view this content.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,445

    Re: Another problem copying formula to column using VBA

    Wherever you have quotes, apart from at the beginning and end of the string (formula), you need to double them up, as in your first formula.


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    09-12-2012
    Location
    DC
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: Another problem copying formula to column using VBA

    I doubled up the quotation marks within the formula, but I still get a syntax error with the second formula. Code was changed to the following:

    Please Login or Register  to view this content.

  4. #4
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Another problem copying formula to column using VBA

    maybe so
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    09-12-2012
    Location
    DC
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: Another problem copying formula to column using VBA

    That did it! Thank you very much!

+ 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