+ Reply to Thread
Results 1 to 4 of 4

VBA macro to put Formula in cell - too long?

  1. #1
    Registered User
    Join Date
    08-16-2010
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Excel 2003
    Posts
    5

    VBA macro to put Formula in cell - too long?

    Hi,

    When I try to run the below code (it should copy the formula into the cell) I get the error message "Run-time error '1004': Application-defined or object-defined error".

    Is this because it is too long? If so, how could I shorten it?

    Thank you in advance for your help!

    Please Login or Register  to view this content.
    Last edited by mac8528; 08-16-2010 at 09:30 AM.

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

    Re: VBA macro to put Formula in cell - too long?

    You have mismatched parentheses, I think. I also don't see the purpose of the VALUE function if you are checking against a string, so try:
    Please Login or Register  to view this content.
    Everyone who confuses correlation and causation ends up dead.

  3. #3
    Registered User
    Join Date
    08-16-2010
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: VBA macro to put Formula in cell - too long?

    Thanks a lot, it works perfectly!

  4. #4
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,998

    Re: VBA macro to put Formula in cell - too long?

    Please don't forget to mark the question 'Solved'.

+ 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