+ Reply to Thread
Results 1 to 13 of 13

Error 2029 #NAME

  1. #1
    Registered User
    Join Date
    02-04-2020
    Location
    Rotterdam, Netherlands
    MS-Off Ver
    2019
    Posts
    5

    Error 2029 #NAME

    I am a newbie and this is my first post.
    I have the following simple code in VBA, but I get a #NAME error in the particular cell after I put a formula in it with the following code.
    I want the following formula in this cell:

    = IF(ISBLANK(F293);"";"CC")

    Please Login or Register  to view this content.
    Now I got a #NAME error in Cell F294.
    Strange about this is that, after I go to the formula bar and go to the end of the (unchanged) formula and strike ENTER, the same code is working well afterall, without error.
    Changing the .Value into .Formula brings no solution.

    Maybe a simple question, but I am working on it for several days without any luck.

    Thanks for helping me out.
    Aad de Graaf
    Last edited by AliGW; 02-05-2020 at 02:09 AM.

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,285

    Re: Error 2029 #NAME

    Try:

    Please Login or Register  to view this content.
    Remember what the dormouse said
    Feed your head

  3. #3
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Error 2029 #NAME

    What are you trying to do? Write a formula into a cell? Then don't use Range().Value but Range().Formula.

    Or are you trying to calculate the value in VBA and writing the result back to the cell?

  4. #4
    Registered User
    Join Date
    02-04-2020
    Location
    Rotterdam, Netherlands
    MS-Off Ver
    2019
    Posts
    5

    Re: Error 2029 #NAME

    Quote Originally Posted by rorya View Post
    Try:

    Please Login or Register  to view this content.
    That's it.
    I think it is the COMMA instead of the SEMICOLON that does the trick.
    Thanks Rory.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,482

    Re: Error 2029 #NAME

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. I have done it for you this time.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  6. #6
    Registered User
    Join Date
    02-04-2020
    Location
    Rotterdam, Netherlands
    MS-Off Ver
    2019
    Posts
    5

    Re: Error 2029 #NAME

    Quote Originally Posted by aaddegraaf View Post
    That's it.
    I think it is the COMMA instead of the SEMICOLON that does the trick.
    Thanks Rory.
    I do have a similar problem with the following code. I think I am making the same mistake again but can't solve it.
    I want to place a formula in a particular cell using a string code. The string is:

    IF(B5="","",CONCATENATE(B5," [",E5,"]"))

    So my code is"

    Please Login or Register  to view this content.
    Can you help me out, Rory. Thx.

  7. #7
    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,681

    Re: Error 2029 #NAME

    Strictly speaking, this is a hijack. But, to save you some time ... you haven't doubled up ALL the double quotes.
    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


  8. #8
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Error 2029 #NAME

    Is it a hijack if the OP adds a new question to the thread?

  9. #9
    Registered User
    Join Date
    02-04-2020
    Location
    Rotterdam, Netherlands
    MS-Off Ver
    2019
    Posts
    5

    Re: Error 2029 #NAME

    Quote Originally Posted by TMS View Post
    Strictly speaking, this is a hijack. But, to save you some time ... you haven't doubled up ALL the double quotes.
    Thx Trevor. I'm still struggling with this problem. I am trying VBA for a short period of time and I'm learning every day.
    IMO all the double quotes are doubled up.
    Will you please write out the working code line for me.
    So:
    ActiveCell.Formula =
    After that the string equivalent of : IF(B5="","",CONCATENATE(B5," [",E5,"]"))

    The three items that the function CONCATENATE has to merge are"

    cell value: B5
    string: " ["
    cell value: E5
    string: "]"

    Hope you can help me out.

  10. #10
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Error 2029 #NAME

    FYI to All,

    Since this the second post today I have seen about VBA error codes for formulas, I have put together a table of Excel errors and they're corresponding VBA error codes...
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  11. #11
    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,681

    Re: Error 2029 #NAME

    @teylyn: no, my bad ... I misinterpreted the statement "I do have a similar problem with the following code ..."

    Try:
    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    02-04-2020
    Location
    Rotterdam, Netherlands
    MS-Off Ver
    2019
    Posts
    5

    Re: Error 2029 #NAME

    That's it, Trevor.
    It's confusing with all the quotes in a formula.
    Every day I learn a little more from that beautiful VBA.

    Aad de Graaf

  13. #13
    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,681

    Re: Error 2029 #NAME

    You're welcome. Thanks for the rep.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Error 2029 - Simply Want Strings
    By js0873 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-29-2020, 10:05 AM
  2. [SOLVED] VBA INDEX/MATCH with two criteria (Error 2029)
    By kaptenstofil in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-23-2014, 03:05 AM
  3. vlookup in VB returns 2029 error
    By C0ppert0p in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-01-2013, 06:02 PM
  4. Error 2029 in LinEst
    By mst3k4L in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-10-2011, 06:23 PM
  5. macro interrupted error 2029
    By radame in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-26-2011, 02:59 PM
  6. Error 2029 - Trying to run an 07' file on 03'
    By PY_ in forum Excel General
    Replies: 2
    Last Post: 12-19-2010, 01:20 AM
  7. VBA Error 2029
    By John Eakins in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-19-2007, 03:48 PM

Tags for this Thread

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