+ Reply to Thread
Results 1 to 3 of 3

Run-time error '1004': Unable to set the FormulaArray property of the Range class

  1. #1
    Forum Contributor
    Join Date
    01-15-2013
    Location
    London
    MS-Off Ver
    Excel 2003, 2007, 2010, 2019
    Posts
    436

    Run-time error '1004': Unable to set the FormulaArray property of the Range class

    Hi everyone,

    I was trying to use a code to set formula (array) for a range of cells as below, but this drove me mad as it failed to work:

    Please Login or Register  to view this content.
    Here, MaxDD is a UDF (tested and works properly).

    Excel always says Run-time error '1004': Unable to set the FormulaArray property of the Range class.

    So what is the problem?

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Run-time error '1004': Unable to set the FormulaArray property of the Range class

    ""
    should be """"
    Stings should be in double quotes.
    If the formula length is over 255 character, you will get another error.

    For j = 1 To 100
    Worksheets("Data").Cells(j + 1, "B").FormulaArray = "=MaxDD(TRANSPOSE(IF(ISNUMBER(1/RC[1]:RC[120]),RC[1]:RC[120],"""")))"
    Next j

  3. #3
    Forum Contributor
    Join Date
    01-15-2013
    Location
    London
    MS-Off Ver
    Excel 2003, 2007, 2010, 2019
    Posts
    436

    Re: Run-time error '1004': Unable to set the FormulaArray property of the Range class

    Thank you so much AB33. This helped me a lot. Finally got this solved .

+ 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. [SOLVED] Run-time error '1004' - Unable to set the Hidden property of the Range class
    By redoscar in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-04-2017, 09:34 AM
  2. Run-time error '1004'; Unable to set the Locked property of the Range class
    By haridevadiga in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-29-2015, 07:30 AM
  3. 1004: Unable to set the FormulaArray property of the Range class
    By drrazor in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-10-2015, 11:39 AM
  4. [SOLVED] Run time error 1004: Unable to set hidden property of range class
    By SAVIOBLUEFOX in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-06-2013, 10:38 AM
  5. unable to set FormulaArray property of Range Class Error
    By BuglerX in forum Access Programming / VBA / Macros
    Replies: 1
    Last Post: 11-23-2011, 01:13 PM
  6. unable to set FormulaArray property of Range class Error
    By BuglerX in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-23-2011, 12:14 PM
  7. Unable to set the FormulaArray Property of the Range Class - Error 1004
    By manchmal2 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-24-2010, 05:08 PM

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