subset variables in a spreadsheet - Statistica Visual Basic - Statistica - Dell Community

subset variables in a spreadsheet

subset variables in a spreadsheet

This question is not answered



I am very new to Statistica and am trying to subset my variables. Please help as when i run the following code, the number of cases also reduce:


Option Base 1
Option Explicit
Sub Main()
    Dim spr As Spreadsheet
    'assigns the active spreadsheet to the object spr
    Set spr = ActiveSpreadsheet
    'create a spreadsheet to hold the subset
    'Assign variables 3-7 with cases 5-20
    Dim S2 As New Spreadsheet
    Set S2 = spr.Subset("3-7", "", "", "", "")
    S2.Visible = True
End Sub


In my base data I have 11000+ cases where as in the spreadsheet created by this macro i can see only 302 cases. Not sure how to modify this.





All Replies
  • The best way to avoid problems is to record a macro . Use Start Recording Log of Analysis from Tools -- Macro, and make a subset interactively - you get macro doing what you want.
  • This is very strange as the code you posted should not exclude any cases...
    If you run this macro against a different dataset (one of the example files, for instance) do you observe the same behavior?

    If your maintenance is current, I suggest that you contact technical support at