hello all,
I have raw data in sheet1.
In user form, there are:
- one RefEdit box ( for selecting data of sheet1)
- several option buttons (such as option1,option2,option3)
- one textbox (for displaying a value derived from one function)
In order to calculate the expected value which will be displayed in textbox, one important parameter is the variance of each column. In RefEdit box, I may select different columns of sheet1. Now, the problem is concerning columns selection of RefEdit box.
I use "worksheetfunction.VarP" to calculate the variance of a column, and V denotes variance. I defined:
V=application.worksheetfunction.VarP(RefEdit1.Columns(1)) 'This is for calculating variance of the first column of selected data of RefEdit box.
V=application.worksheetfunction.VarP(RefEdit1.Columns(2)) 'This is for calculating variance of the second column of selected data of RefEdit box.
but it seems this is not the correct way since I cannot get the expected value.
Could someone give me some direction? Thanks a lot!!
I have raw data in sheet1.
In user form, there are:
- one RefEdit box ( for selecting data of sheet1)
- several option buttons (such as option1,option2,option3)
- one textbox (for displaying a value derived from one function)
In order to calculate the expected value which will be displayed in textbox, one important parameter is the variance of each column. In RefEdit box, I may select different columns of sheet1. Now, the problem is concerning columns selection of RefEdit box.
I use "worksheetfunction.VarP" to calculate the variance of a column, and V denotes variance. I defined:
V=application.worksheetfunction.VarP(RefEdit1.Columns(1)) 'This is for calculating variance of the first column of selected data of RefEdit box.
V=application.worksheetfunction.VarP(RefEdit1.Columns(2)) 'This is for calculating variance of the second column of selected data of RefEdit box.
but it seems this is not the correct way since I cannot get the expected value.
Could someone give me some direction? Thanks a lot!!
Last edited: