+ Reply to Thread
Results 1 to 5 of 5

Slope and Intercept using Macro

  1. #1
    Registered User
    Join Date
    08-28-2012
    Location
    hyderabad
    MS-Off Ver
    Excel 2010
    Posts
    1

    Unhappy Slope and Intercept using Macro

    User inputs N entries in column A and B corresponding to values X and Y of a liner function. and write a macro to compute the Slope and Intercept. Macro to be linked to the button.
    cant use inbuilt statistical / mathematical functions

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Slope and Intercept using Macro

    You don't need a macro, only simple formulas, attach please a sample file with data
    If solved remember to mark Thread as solved

  3. #3
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Slope and Intercept using Macro

    Hi habeebshafi,

    This seems to look like a homework type question and we don't do homework, but we are here to help get you moving in the right direction.

    Also, is it possilby this person is a friend of yours and you are struggling with the same problem (or homework problem)?

    http://www.excelforum.com/excel-prog...html?p=2922378
    HTH
    Regards, Jeff

  4. #4
    Registered User
    Join Date
    12-07-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Slope and Intercept using Macro

    Yeah dis was the question in our paper.. but we were unable to solve (atleast i could not) so i asked in open forum. So if such kind of problem comes again I will be able to solve it.

    And the problem is not how to create the program... anybody can write the code. It is very easy.it is what is the procedure to solve the problem for calculating slope and intercept with "n" numbers. Calculating with two x and y co ordinate or by regression anybody can do it.

    If you don't want to help it its fine... no problem .... Just don't give excuses or just accept you people are also not able to solve it without formula.

  5. #5
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Slope and Intercept using Macro

    The first step in any problem like this (especially if you are not allowed to use preprogrammed functions) is to understand the statistics behind the problem. Programming it in VBA should then be easy. Any intro to statistics text should have a chapter on linear regression and how to obtain slope and intercept, or an internet site like http://www.easycalculation.com/stati...regression.php It's a fairly simple algorithm for linear regressions, but it should be easy to program those sums into VBA.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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