+ Reply to Thread
Results 1 to 3 of 3

#Name? error when using VBA to put a formula in a cell

  1. #1
    Registered User
    Join Date
    06-04-2011
    Location
    NSW Australia
    MS-Off Ver
    Excel 2007
    Posts
    43

    #Name? error when using VBA to put a formula in a cell

    Hello

    I am trying to use VBA to place a formula in a cell, but I keep getting a #Name? error.

    I know why the error occurs. When the formula is placed in the cell by the code it looks like
    Please Login or Register  to view this content.
    when it should look like
    Please Login or Register  to view this content.
    How do I stop the formula from ending up with the apostrophes around the cell reference.

    This is the entire piece of code

    Please Login or Register  to view this content.
    Thank you

  2. #2
    Registered User
    Join Date
    06-04-2011
    Location
    NSW Australia
    MS-Off Ver
    Excel 2007
    Posts
    43

    Re: #Name? error when using VBA to put a formula in a cell

    Stop looking. I worked it out. I changed
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    and that did the trick.

    Thanks

  3. #3
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: #Name? error when using VBA to put a formula in a cell

    @ ozhunter

    Based on your last post it seems that you solved your problem on your own but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

+ 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