+ Reply to Thread
Results 1 to 5 of 5

Relative References in Array Formulas - VBA

  1. #1
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Relative References in Array Formulas - VBA

    Hi all,

    I am trying to figure out why something is not working out for me.

    I am using the following code to insert an array formula within the specified range.

    It works, except the the last A1 (which I have left as a relative reference) is not actually changing as you go down the rows...(i.e. the formula is exactly the same in the whole range)... I would expect it to change to A2, A3, A4, etc....

    Please Login or Register  to view this content.
    with this folllowing code which is not an array formula, it works as expected....is it something to do with array formulas... do I need to reference the cells differently?

    Please Login or Register  to view this content.
    EDIT:

    Is it perhaps because I am starting this formula in row 3 and since it references A1, it is confused somehow?
    Last edited by NBVC; 11-02-2007 at 11:22 AM.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  2. #2
    Valued Forum Contributor Richard Schollar's Avatar
    Join Date
    05-23-2006
    Location
    Hampshire UK
    MS-Off Ver
    Excel 2002
    Posts
    1,264
    Hi Vittorio

    Can I suggest you try try entering it slightly differently:

    Please Login or Register  to view this content.
    See if that works any better.

    Richard

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Talking

    Hi Richard,

    Once again, you have solved my dilemma....Thank you very much!

    Just curious.... was I right in assuming it is because I started the formula in Row 3 and since I was referencing A1 (ie. Row 1) , that caused VBA to freeze it?

  4. #4
    Valued Forum Contributor Richard Schollar's Avatar
    Join Date
    05-23-2006
    Location
    Hampshire UK
    MS-Off Ver
    Excel 2002
    Posts
    1,264
    Quote Originally Posted by NBVC
    Just curious.... was I right in assuming it is because I started the formula in Row 3 and since I was referencing A1 (ie. Row 1) , that caused VBA to freeze it?
    No, I don't think that makes any difference - I think it is simply a product of the inner workings of the FormulaArray property. Could be wrong, however

    Richard

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Quote Originally Posted by RichardSchollar
    No, I don't think that makes any difference - I think it is simply a product of the inner workings of the FormulaArray property. Could be wrong, however

    Richard

    .... I guess just one more reason why VBA can be so confusing....

    Well, thanks once again Richard. I always appreciate your valuable help and advice.

    Have a good day!

+ 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