Set-SLVlookup


Synopsis

Perform vlookup.Supports lookup from same or on different worksheets.

Syntax

Description

Perform vlookup.Supports lookup from same or on different worksheets. The lookup worksheet(s) have to be from the same workbook.

Parameters

-WorkBookInstance

Instance of an excel document that can be used for editing.

Required? True
Position? 1
Default value  
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? False

-VRangeworksheetname

This is the name of the worksheet that contains the lookup table.

Required? True
Position? named
Default value  
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? False

-VRange

The range that contains the lookup values eg: A1:D20.

Required? True
Position? named
Default value  
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? False

-Vcellworksheetname

This is the worksheetname that will host the vlookup formula.

Required? True
Position? named
Default value  
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? False

-Vlookupcell

This is the lookup cell reference. Example – “C10″.

Required? True
Position? named
Default value  
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? False

-VFormulacellRange

This is the range containing the lookup formula. Example = “D10:D20″. Note range must include cells from the same column

Required? True
Position? named
Default value  
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? False

-DataColumn

This is the datacolumn from the lookup table that contains the value(s) to be pulled.
So if the lookup range is D1:G6 the datatable is 4 columns wide so count from 1(D) to G(4).

Required? True
Position? named
Default value  
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? False

This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

Inputs

String,SpreadsheetLight.SLDocument

Outputs

SpreadsheetLight.SLDocument

Notes

Examples

Example 1

Use vlookup to lookup a datatable(E5:G7) contained in worksheet &;39;disk&;39; and dump the matching values into worksheet &;39;OS&;39;.
Note: since we are populating 2 columns H & I we need to use the vlookup cmdlet twice.

Example 2

Use vlookup to lookup and insert values in the worksheet &;39;disk&;39;.

Related links