+ Reply to Thread
Results 1 to 10 of 10

How to create a normal gaussian distribution chart using vba macro?

  1. #1
    Registered User
    Join Date
    09-06-2009
    Location
    Jakarta
    MS-Off Ver
    Excel 2003
    Posts
    9

    Question How to create a normal gaussian distribution chart using vba macro?

    I have data on sheet1 (attached). How can I create a normal gaussian distribution chart using vba macro in Excel of based on the column selection on sheet1 and put the chart on sheet2?

    I found some link in this forum on how to create gaussian distribution in Excel:
    http://tushar-mehta.com/excel/charts...tion/index.htm
    http://www.exceluser.com/explore/statsnormal.htm

    but if it is possible to create those above charts automatically using macro, I would appreciate if someone could share the code to me..

    Regards,
    WiD
    Attached Files Attached Files

  2. #2
    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: How to create a normal gaussian distribution chart using vba macro?

    Why would you want use use a macro when it requires nothing more than listing some x values and copying down a single formula -- what's the advantage?

    If you really want a macro, record one while doing the above.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    09-06-2009
    Location
    Jakarta
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: How to create a normal gaussian distribution chart using vba macro?

    I have hundreds of the same spreadsheets that need gaussian distribution to help on looking the distribution of the data. If on every cells I have to create the charts manually then it would be painful.

    Rgds,
    WiD

  4. #4
    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: How to create a normal gaussian distribution chart using vba macro?

    Make one sheet (5 minutes) and 100 copies (30 seconds).

  5. #5
    Registered User
    Join Date
    09-06-2009
    Location
    Jakarta
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: How to create a normal gaussian distribution chart using vba macro?

    what I meant was every sheet containing different data. If 1-sheet takes 5 min, based on your calculation then it gonna take 5min x 100 to finish. Anyway, many thanks for the suggestion, I will create on manual way.

    Rgds,
    WiD

  6. #6
    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: How to create a normal gaussian distribution chart using vba macro?

    Where would the data come from?

    Even if you create the template sheet, you have to add it from someplace.

  7. #7
    Registered User
    Join Date
    09-06-2009
    Location
    Jakarta
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: How to create a normal gaussian distribution chart using vba macro?

    the data come from another calculation using another macro on the workbook. So the data will be totally different from one workbook to another workbooks. And I have more than 100 workbooks. On each of workbook I have 3 sheets, the 1st and 2nd sheet are original data, 3rd sheet the calculation data by macro based on 1st and 2nd, and the 4th sheet I wish could have auto created -gaussian normal distribution chart.

    Rgds,
    WiD

  8. #8
    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: How to create a normal gaussian distribution chart using vba macro?

    and the 4th sheet I wish could have auto created -gaussian normal distribution chart.
    I guess I don't know what that means.

    Do you want to extract the mean and deviations from some data, plot the distribution of the data gainst some bin size, and also plot a gaussian distribution having the same mean and deviation?

    If that's it, then create a template sheet having what you want, and then (in a macro, if you like) insert a copy of that sheet into your workbook, and then your macro can plug in the data.

    No one (not me, anyway) could write a macro for you without knowing what you want, and the only details are what I'm making up as I go along.

  9. #9
    Registered User
    Join Date
    09-06-2009
    Location
    Jakarta
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: How to create a normal gaussian distribution chart using vba macro?

    Yes, that's it. Thanks again for suggestion.

    Rgds,
    WiD

  10. #10
    Registered User
    Join Date
    09-06-2009
    Location
    Jakarta
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: How to create a normal gaussian distribution chart using vba macro?

    I was just googling and found an interesting articles that give an example step by step how to create this gaussian curve using vb macro.
    http://books.google.com/ , book title Microsoft Excel VBA Professional Projects by Duane Birnbaum (pages 601-638).

    I will start learn from it. Again thanks for the replies.

    Rgds,
    WiD

+ 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