+ Reply to Thread
Results 1 to 4 of 4

Using macro to create formulas - run time error

  1. #1
    Forum Contributor
    Join Date
    05-26-2004
    Location
    Halifax, UK
    MS-Off Ver
    Office 2016
    Posts
    260

    Using macro to create formulas - run time error

    I am trying to use a macro to create formulas as I can't simply drag them across the required range. The code I current have is:

    Please Login or Register  to view this content.
    However when I try to run this I get the error message "Run-time error '1004': Application-defined or object-define error".

    It has something to do with the line:

    Please Login or Register  to view this content.
    Strangely enough however the first attempt I had at this worked, which was:

    Please Login or Register  to view this content.
    The mistake here was that I missed out the semi-colon, the ":" part of the previous line, so when the formulas were created they were not create as the ranges were not seperated by a : symbol. However I don't see why my corrected version does not work since all I did was add in:

    Please Login or Register  to view this content.
    to the code. Why does this make it not work now?

    Thanks

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Using macro to create formulas - run time error

    Try


    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    05-26-2004
    Location
    Halifax, UK
    MS-Off Ver
    Office 2016
    Posts
    260

    Re: Using macro to create formulas - run time error

    Ah okay, got it. Must have forgetten the second "I".

    Am having another weird issue. The following line gives the same error:

    Please Login or Register  to view this content.
    I have the second "D" in there but get an error. If I replace the D with say a Z it works. If the term ":D" restricted? I don't see why it should be since it's just entered text into a cell.

  4. #4
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Using macro to create formulas - run time error

    It's that ) after the first D

    Please Login or Register  to view this content.

+ 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