+ Reply to Thread
Results 1 to 9 of 9

help me on dis MACRO question its very urgent

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

    help me on dis MACRO question its very urgent

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




    M (Slope)
    C (Intercept)

    Equation (Y = MX + C) Y=mX+C


    Please reply as soon as possible
    Attached Files Attached Files

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,676

    Re: help me on dis MACRO question its very urgent

    Looking like homework ... Don't do homework questions. You do homework questions.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


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

    Re: help me on dis MACRO question its very urgent

    Its not homework. I dont know how should i proceed... i have been trying this question from past two days yet no able to solve thats why put it online... please help me on this question.. or at least tell me how i sho

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,676

    Re: help me on dis MACRO question its very urgent

    If: Y=MX+C
    Then: Y-C=MX
    And: (Y-C)/X=M

    But you have two constants, M and C ... I don't really know how you can determine what they are. If you have one, then you can calculate the other.

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

    Re: help me on dis MACRO question its very urgent

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    HTH
    Regards, Jeff

  6. #6
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: help me on dis MACRO question its very urgent

    An appropriate title would be "Slope and Intercept using Macro"

    And strangely enough, a thread for this exact question was asked a few days ago here (I took the suggested title from that thread):
    http://www.excelforum.com/excel-prog...ing-macro.html

    So yeah, 2 users asking an identical question? This is homework.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,676

    Re: help me on dis MACRO question its very urgent

    Oh, it is so homework ... and despite the different user names, it should constitute a duplicate thread. Maybe they're on the same course!?

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

    Re: help me on dis MACRO question its very urgent

    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.

    Actually 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.

    @TMshucks.. thanx actually i also got stuck at the same point i can solve this problem with two variables but solving it by more than two variables i dont knw... dat y i came to this forum

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

    Re: help me on dis MACRO question its very urgent

    This is the first time i registered or log in to this site. So i exactly did not know how to write the forum or if anybody already have asked the same question and also, if we can focus on problem it would be a great help.

+ 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