Hi,
I am performing regression analysis.
I created a button, and am running the following macro -
Sub Macro5()
'
' Macro5 Macro
'
'
ActiveSheet.Range("$o$16:$w$34").Clear
Application.Run "ATPVBAEN.XLAM!Regress", ActiveSheet.Range("$h$15:$h$32"), _
ActiveSheet.Range("$i$15:$l$32"), False, True, , ActiveSheet.Range("$o$16") _
, False, False, False, False, , False
End Sub
Currently, I have defined Y-range as $h$15:$h$32, however, I want to automatically choose y- and x- range.
Currently $h$15:$h$32 is based on historical data. However, this range then has zero data, when another set of y-variable is chose (based on forecasted data). I would like to automatically choose all-non zero data in column h, and automatically chose the corresponding data in range i:l. For example, if the data range with non-zeros start in range ("$h$33:$h$40), then x-range will be ("$i$33:$l$40").
Thanking you in advance for your help.
I am performing regression analysis.
I created a button, and am running the following macro -
Sub Macro5()
'
' Macro5 Macro
'
'
ActiveSheet.Range("$o$16:$w$34").Clear
Application.Run "ATPVBAEN.XLAM!Regress", ActiveSheet.Range("$h$15:$h$32"), _
ActiveSheet.Range("$i$15:$l$32"), False, True, , ActiveSheet.Range("$o$16") _
, False, False, False, False, , False
End Sub
Currently, I have defined Y-range as $h$15:$h$32, however, I want to automatically choose y- and x- range.
Currently $h$15:$h$32 is based on historical data. However, this range then has zero data, when another set of y-variable is chose (based on forecasted data). I would like to automatically choose all-non zero data in column h, and automatically chose the corresponding data in range i:l. For example, if the data range with non-zeros start in range ("$h$33:$h$40), then x-range will be ("$i$33:$l$40").
Thanking you in advance for your help.