+ Reply to Thread
Results 1 to 6 of 6

Passing Variable to LINEST

  1. #1
    RW
    Guest

    Passing Variable to LINEST

    I am using the following formula:
    =SUM(LINEST(A$3:A$6, B$3:B$6)*{61590,1})

    I need to use a value from a cell rather than typing the value (61590 in the
    above equation) into the formula each time. I have tried using quotes,
    parentheses, brackets, etc. without any luck.

    I am using Excel 2002. How is this done?

    Thanks

  2. #2
    Max
    Guest

    Re: Passing Variable to LINEST

    Perhaps try, array-entered
    (i.e. press CTRL+SHIFT+ENTER):

    =SUM(LINEST(A$3:A$6,B$3:B$6)*D2:E2)

    where D2 will house: 61590 (say)
    and E2 will contain: 1
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "RW" <[email protected]> wrote in message
    news:[email protected]...
    > I am using the following formula:
    > =SUM(LINEST(A$3:A$6, B$3:B$6)*{61590,1})
    >
    > I need to use a value from a cell rather than typing the value (61590 in

    the
    > above equation) into the formula each time. I have tried using quotes,
    > parentheses, brackets, etc. without any luck.
    >
    > I am using Excel 2002. How is this done?
    >
    > Thanks




  3. #3
    Max
    Guest

    Re: Passing Variable to LINEST

    Maybe better to make the cell refs (D2:E2) absolute,
    in case you're copying across, so try instead, array-entered:
    =SUM(LINEST(A$3:A$6,B$3:B$6)*$D$2:$E$2)
    Adapt to suit ..
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  4. #4
    RW
    Guest

    Re: Passing Variable to LINEST

    Thanks!!

    "Max" wrote:

    > Maybe better to make the cell refs (D2:E2) absolute,
    > in case you're copying across, so try instead, array-entered:
    > =SUM(LINEST(A$3:A$6,B$3:B$6)*$D$2:$E$2)
    > Adapt to suit ..
    > --
    > Rgds
    > Max
    > xl 97
    > ---
    > GMT+8, 1° 22' N 103° 45' E
    > xdemechanik <at>yahoo<dot>com
    > ----
    >
    >
    >


  5. #5
    Max
    Guest

    Re: Passing Variable to LINEST

    You're welcome !
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "RW" <[email protected]> wrote in message
    news:[email protected]...
    > Thanks!!




  6. #6
    Harlan Grove
    Guest

    Re: Passing Variable to LINEST

    Max wrote...
    >Perhaps try, array-entered
    >(i.e. press CTRL+SHIFT+ENTER):
    >
    >=SUM(LINEST(A$3:A$6,B$3:B$6)*D2:E2)

    ....

    Better still would be using SUMPRODUCT.

    =SUMPRODUCT(LINEST(A$3:A$6,B$3:B$6),D2:E2)

    However, if the E2 value were always 1 (for the constant term from the
    regression coefficients), it'd make more sense to use TREND or
    FORECAST.

    =TREND(A$3:A$6,B$3:B$6,D2)

    =FORECAST(D2,A$3:A$6,B$3:B$6)

    You can drive screws with hammers and pound nails with screwdrivers,
    but should you?


+ 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