+ Reply to Thread
Results 1 to 2 of 2

Standard Deviation VBA code

  1. #1
    Registered User
    Join Date
    11-30-2010
    Location
    Raleigh, NC
    MS-Off Ver
    Excel 2007
    Posts
    1

    Standard Deviation VBA code

    Hey everyone. I need help with the vba code to calculate the standard deviation for any number of values entered into column A. I already have the code for number of values, sum, and average. Having trouble with the standard deviation. Workbook is attached, thanks!

    I forgot to mention that I can't use the excel functions in my code. Thanks!
    Attached Files Attached Files

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

    Re: Standard Deviation VBA code

    Hi Logan, welcome to the forum.

    Yes, you can use Excel functions in your code. It's quite standard practice, actually. Unless, of course, this is a homework assignment and you've been instructed not to. In which case, using VBA to do math is as easy as assigning variables, performing math on those variables, and getting a result.

    Use your knowledge of how to calculate a standard deviation by hand, then convert that information to formulas.

    Since you already have code to get the other values, I thought I'd at least help provide more efficient code to get the results without using Excel worksheet functions.
    Please Login or Register  to view this content.

+ 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