Spreadsheet.Subset

This property creates a new spreadsheet containing the specified subset of the current spreadsheet using Selection Conditions.

This property is read only.

Syntax Parameters Return Value
ReadOnly Property Spreadsheet.Subset( _
    Variables As Variant, _
    Optional selectionIncludeExpression As String = "", _
    Optional selectionIncludeList As String = "", _
    Optional selectionExcludeExpression As String = "", _
    Optional selectionExcludeList As String = "") As Spreadsheet
  • Variables [in]

Which variables to subset.

Type: Variant

  • selectionIncludeExpression [in,optional]

The selection condition inclusion expression. Note that this parameter defaults to an empty string.

Type: String

Default value: ""

  • selectionIncludeList [in,optional]

Type: String

Default value: ""

  • selectionExcludeExpression [in,optional]

Type: String

Default value: ""

  • selectionExcludeList [in,optional]

Type: String

Default value: ""

Spreadsheet

SVB Example

Subsetting data:

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", "", "5:20", "", "")
    s2.Visible = True
End Sub