HypKeepOnly
Cloud data provider types: Oracle Analytics Cloud - Essbase, Planning (ad hoc only), Planning Modules (ad hoc only), Financial Consolidation and Close (ad hoc only), Tax Reporting (ad hoc only)
On-premises data provider types: Oracle Essbase, Oracle Hyperion Planning(ad hoc only), Oracle Hyperion Financial Management (ad hoc only)
Description
HypKeepOnly() retains only the selected member(s) in the sheet and removes unselected members.
Selection must include only member cells, not data cells.
Syntax
HypKeepOnly(vtSheetName, vtSelection)
ByVal vtSheetName As Variant
ByVal vtSelection As Variant
Parameters
vtSheetName: The name of worksheet on which to run the function. If vtSheetName is Null
or Empty
, the active worksheet is used.
vtSelection: The range object that refers to the member(s) to be kept. If selection is Null or Empty, the active cell is used.
Return Value
Returns 0 if successful; otherwise, returns the appropriate error code.
Examples
To keep only one member name:
Public Declare Function HypKeepOnly Lib "HsAddin" (ByVal vtSheetName As Variant, ByVal vtSelection As Variant) As Long
Sub Example_HypKeepOnly()
X=HypKeepOnly(Empty, RANGE("D2"))
If X = 0 Then
MsgBox("Keep Only successful.")
Else
MsgBox("Keep Only failed." + X)
End If
End Sub
To keep multiple member names:
Public Declare Function HypKeepOnly Lib "HsAddin" (ByVal vtSheetName As Variant, ByVal vtSelection As Variant) As Long
Sub Example_HypKeepOnly
X=HypKeepOnly(Empty, RANGE("D2:A5"))
If X = 0 Then
MsgBox("Keep Only successful.")
Else
MsgBox("Keep Only failed." + X)
End If
End Sub