+ Reply to Thread
Results 1 to 9 of 9

Set ForumlaArray property

  1. #1
    Registered User
    Join Date
    05-23-2013
    Location
    California
    MS-Off Ver
    Excel 2013
    Posts
    68

    Set ForumlaArray property

    Hello, All.

    I have researched this error quite a bit and still cannot find a fix to the code below. I am trying to set an Array Forumla using VBA. The formula is less than 255 characters.

    Any advice would be greatly appreciated.

    Please Login or Register  to view this content.

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Set ForumlaArray property

    typo in 'forumla'
    Please Login or Register  to view this content.
    oughta be
    Please Login or Register  to view this content.
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Registered User
    Join Date
    05-23-2013
    Location
    California
    MS-Off Ver
    Excel 2013
    Posts
    68

    Re: Set ForumlaArray property

    Good catch! Missed the simple thing.

    I do still, however, get the same error with the corrected formula.

  4. #4
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Set ForumlaArray property

    you didn't actually say what the error was?

    I reckon you don't want one array formula for the whole column though-did you mean this (untested)
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    05-23-2013
    Location
    California
    MS-Off Ver
    Excel 2013
    Posts
    68

    Re: Set ForumlaArray property

    What you wrote above worked. I did not use the third line of code as when the formula is inserted, it automatically autofills the rest of the table.

    My question does the "with" construct change how the formula is being inserted? My untrained eye does not see a whole lot of difference between.

    Please Login or Register  to view this content.
    and

    Please Login or Register  to view this content.
    Thanks for your help!

  6. #6
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Set ForumlaArray property

    your code was attempting to array-enter the formula into the entire column at once, which won't work, whereas mine put an array formula into the first cell-note the .Cells(1) part

  7. #7
    Registered User
    Join Date
    05-23-2013
    Location
    California
    MS-Off Ver
    Excel 2013
    Posts
    68

    Re: Set ForumlaArray property

    I do see that your code is dropping it in a particular cell rather than the whole column. I guess the "with" probably isnt what is making the difference there.

  8. #8
    Registered User
    Join Date
    05-23-2013
    Location
    California
    MS-Off Ver
    Excel 2013
    Posts
    68

    Re: Set ForumlaArray property

    Quote Originally Posted by JosephP View Post
    your code was attempting to array-enter the formula into the entire column at once, which won't work, whereas mine put an array formula into the first cell-note the .Cells(1) part
    Thanks, Joseph. I appreciate your help on this one.

  9. #9
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Set ForumlaArray property

    Using With rarely makes a difference to how code operates-it just saves typing and can speed code up

+ 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