+ Reply to Thread
Results 1 to 5 of 5

Getting values from different columns in one formula

  1. #1
    Registered User
    Join Date
    10-03-2011
    Location
    Denmark
    MS-Off Ver
    Excel 2003
    Posts
    16

    Getting values from different columns in one formula

    Say I have 20 different X values and 20 different Y values, and I want to make a least squares regression.

    But all the X values are spread out over different columns (and so are the Y values).
    So lets say the X values could be:
    A1:A6, D1:D6, F1:F6.
    And the Y values are B1:B6, E1:E6, G1:G6.

    The only way I know how to do a linear regression would be to copy past the X (and the Y values) to the same column, so the D1:D6 x values would be placed at A7:A12 and the F1:F6 values would be placed at A13-A18.
    But is there any way in which I can avoid this time consuming copy paste problem?

    I attached an excel file to describe the problem. Hope someone (smart) can help me.
    Attached Files Attached Files
    Last edited by MathiasH; 05-09-2012 at 05:54 PM.

  2. #2
    Valued Forum Contributor ron2k_1's Avatar
    Join Date
    09-30-2009
    Location
    Not the USA
    MS-Off Ver
    Excel 2003, 2007
    Posts
    606

    Re: Getting values from different columns in one formula

    Do you mean, for instance if you have your x's in A1:A6 and y's in B1:B6, and instead of having:
    Please Login or Register  to view this content.
    You can do this, where values in A1:A6 are in the first set enclosed by {}, and values in B1:B6 are in the second set. You'll get the same answer:
    Please Login or Register  to view this content.
    Remember to still confirm with Ctrl Shift Enter
    Ron
    Knowledge is knowing that a tomato and pepper are fruits. Wisdom is knowing whether to put these in a fruit salad

    Kindly

    [1] Use code tags. Place "[code]" before the first line of code and "[/code"]" after the last line of code. Exclude quotation marks
    [2] Mark your post [SOLVED] if it has been answered satisfactorily by editing your original post in advanced mode.
    [3] Thank (using the little scale) those that provided useful help; its nice and its very well appreciated

  3. #3
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Getting values from different columns in one formula

    Hi Mathias,

    Please edit your post to explain the issue you're having. Some people cannot download attachments, while others simply won't without knowing something about it first.

    Thank you.

  4. #4
    Registered User
    Join Date
    10-03-2011
    Location
    Denmark
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Getting values from different columns in one formula

    What I want is the below:
    Say I have 20 different X values and 20 different Y values, and I want to make a least squares regression.

    But all the X values are spread out over different columns (and so are the Y values).
    So lets say the X values could be:
    A1:A6, D1:D6, F1:F6.
    And the Y values are B1:B6, E1:E6, G1:G6.

    The only way I know how to do a linear regression would be to copy past the X (and the Y values) to the same column, so the D1:D6 x values would be placed at A7:A12 and the F1:F6 values would be placed at F13-F18.
    But is there any way in which I can avoid this time consuming copy paste problem?

  5. #5
    Registered User
    Join Date
    10-03-2011
    Location
    Denmark
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Getting values from different columns in one formula

    I editted the thread. Does anybody know a solution to my problem, or is there actually any solution to this (except just doing it the hard way by copypasting)?

+ 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