+ Reply to Thread
Results 1 to 8 of 8

method FormulaArray of object range failed Error Help

  1. #1
    Registered User
    Join Date
    05-16-2017
    Location
    New Jersey
    MS-Off Ver
    2010
    Posts
    51

    method FormulaArray of object range failed Error Help

    Why does the below code work fine and the other doesn't

    Please Login or Register  to view this content.
    But the below code doesn't work it gives me the following error message "method FormulaArray of object range failed" it stops at the last line of code below

    Please Login or Register  to view this content.
    As seen on my attached file Project file works perfectly fine but in Project2 file when I add in the "Const ApplyRngAddress As String = "A4" and "Set ChangedCll = Intersect(Target, Range(ApplyRngAddress))" code line it doesn't work.
    Attached Files Attached Files
    Last edited by lsantana; 01-15-2021 at 11:11 AM.

  2. #2
    Registered User
    Join Date
    05-16-2017
    Location
    New Jersey
    MS-Off Ver
    2010
    Posts
    51

    Re: method FormulaArray of object range failed Error Help

    Wow my first post that seem to stump everyone. Please anyone knows why the error message comes up please help sent already all day looking for the answer.

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,431

    Re: method FormulaArray of object range failed Error Help

    The contents of the variables FcstFormula and ActualFormula are not being added to the formula, instead the text is.

    Untested but the code should read more like this.
    Please Login or Register  to view this content.
    Also the last element should be ActualFormula rather than just Actual as you had.
    Cheers
    Andy
    www.andypope.info

  4. #4
    Registered User
    Join Date
    05-16-2017
    Location
    New Jersey
    MS-Off Ver
    2010
    Posts
    51
    I use Fcst and Actual as place holders because after that line of code Im using replace to change Fcst and Actual to the actual formula since the formula itself is to long for FormulaArray. Also if that’s the case why does it run without no error message in my top code?
    Last edited by AliGW; 01-16-2021 at 04:58 AM. Reason: PLEASE don't quote unnecessarily!

  5. #5
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,431

    Re: method FormulaArray of object range failed Error Help

    You need to post an example file so we can actual test.

    See yellow banner at top of page on how to attach example file.

    It would be useful to have a cell with the required formula, that works, for comparison with your vba generated formula.

  6. #6
    Registered User
    Join Date
    05-16-2017
    Location
    New Jersey
    MS-Off Ver
    2010
    Posts
    51

    Re: method FormulaArray of object range failed Error Help

    I've added the file to the forum. As you can see the VBA works perfectly fine in the Project file but in Project 2 file it give me the error message.
    Last edited by AliGW; 01-16-2021 at 04:58 AM. Reason: PLEASE don't quote unnecessarily!

  7. #7
    Registered User
    Join Date
    05-16-2017
    Location
    New Jersey
    MS-Off Ver
    2010
    Posts
    51

    Re: method FormulaArray of object range failed Error Help

    I was able to solve it myself after hours reviewing it.

    I just added "Application.EnableEvents = False" at the beginning of the code and "Application.EnableEvents = True" at the end of the code and it works fine now.

  8. #8
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,431

    Re: method FormulaArray of object range failed Error Help

    Glad you were able to resolve your own problem, and thanks for posting the cure.

+ 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. Runtime Error - Method Value of Object Range failed
    By livinsc in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-10-2019, 08:55 AM
  2. Method 'Delete' of object 'Range' failed - Error
    By JimmyA in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-24-2017, 01:20 PM
  3. [SOLVED] Error - Method 'range of object' - Global failed
    By highlystrung in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-05-2015, 06:18 AM
  4. [SOLVED] Method 'Range' of Object'_Global' Failed Error
    By cmurda in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-13-2014, 07:11 PM
  5. Error: Method 'Value' of Object 'Range' Failed
    By jsotor4 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-21-2014, 08:58 AM
  6. Help! Method 'Range' of object '_Worksheet' failed (msg) error
    By jasono in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-17-2011, 12:44 PM
  7. Method 'Range' of object' _Global failed error
    By randell.graybill in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-12-2009, 01:52 AM

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