RawlinsCross
Active Member
- Joined
- Sep 9, 2016
- Messages
- 437
I have a userform that displays a graph. The userform has some private member variables through which certain data is passed,
I'd like to include a button on the userform that takes the mRYValues (data) and calculates the mean and standard deviation and tests for outliers (say over +3 standard deviations) and removes them. The thing is, any data that is moved in mrYValues (data) has to also remove the corresponding mrYValues (dates). Any thoughts on the best way to accomplish this? I'm thinking perhaps a function that accepts two ranges (X and Y), does the work on the Y data, adjusts the X data and returns both ranges again? Not sure......
Code:
Option Explicit
'--userform module variables
Private msAxisTitle As String 'accepts axis title
Private msCaptionForGraph As String 'accepts caption for userform
Private msDataIdentifier As String 'accepts the string that identifies what column is to be graphed
Private mrXValues As Range 'X values (dates)
Private mrYValues As Range 'Y values (data - could have extreme values)
Private mwksWorksheet As Worksheet 'accepts the worksheet the data exists on
I'd like to include a button on the userform that takes the mRYValues (data) and calculates the mean and standard deviation and tests for outliers (say over +3 standard deviations) and removes them. The thing is, any data that is moved in mrYValues (data) has to also remove the corresponding mrYValues (dates). Any thoughts on the best way to accomplish this? I'm thinking perhaps a function that accepts two ranges (X and Y), does the work on the Y data, adjusts the X data and returns both ranges again? Not sure......