+ Reply to Thread
Results 1 to 8 of 8

Referring to an array column or row of LinEst function

  1. #1
    Forum Contributor
    Join Date
    08-14-2008
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    103

    Referring to an array column or row of LinEst function

    Hi,

    I am trying to use the LinEst function in a program. There are some good examples on the web but they all refer to a range in the format “A1:A45”. Is there a way to refer to a column in an existing array instead?

    For example (thanks to Shg for this code):

    Instead of:
    Please Login or Register  to view this content.
    Could I have

    Please Login or Register  to view this content.
    Where Array1 holds some data of interest.

    Hope this makes sense.
    Last edited by HammerTime; 01-13-2010 at 11:45 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    10-15-2007
    Location
    Home
    MS-Off Ver
    Office 2010, W10
    Posts
    373

    Re: Referring to an array column or row of LinEst function

    Hi

    Not sure I understood correctly.

    You mean like this?

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    08-14-2008
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    103

    Post Re: Referring to an array column or row of LinEst function

    Thanks that help, but I was thinking something like this:

    Please Login or Register  to view this content.
    Or is this not possible?

  4. #4
    Valued Forum Contributor
    Join Date
    10-15-2007
    Location
    Home
    MS-Off Ver
    Office 2010, W10
    Posts
    373

    Re: Referring to an array column or row of LinEst function

    If it's an array, try:

    Please Login or Register  to view this content.

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Referring to an array column or row of LinEst function

    You could do it like this:
    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  6. #6
    Forum Contributor
    Join Date
    08-14-2008
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    103

    Re: Referring to an array column or row of LinEst function

    Thanks to both of you, that is exactly what I'm after.

    Shg, what does the .Transpose do? This seems to be the main difference between your solution and lecxe's.

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Referring to an array column or row of LinEst function

    A single transpose converts a 2D column array to a 1D array.

    You should look in the Locals window as you step through the code with and without the transpose.

    Nothing will improve your coding like learning to debug.

  8. #8
    Forum Contributor
    Join Date
    08-14-2008
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    103

    Re: Referring to an array column or row of LinEst function

    Thanks for the tip

+ 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