SpreadsheetDocument.FindValue

Syntax:

FindValue(<Value>, <Beginning>, <Where>, <SearchByRows>, <SearchForward>)

Parameters:

<Value> (required)

Type: Arbitrary.
Sought value.

<Beginning> (optional)

Type: SpreadsheetDocumentRange.
The area after which the search is executed. If the parameter is not specified the search will be started from the beginning of a spreadsheet document.

<Where> (optional)

Type: SpreadsheetDocumentRange.
The area where the search is executed. If this parameter is not specified, search is performed in all cells of the spreadsheet document.

<SearchByRows> (optional)

Type: Boolean.
Defines cells tab order by search.
True - search in current row, then go to the next, etc., in the general search direction, False - search in current column, then go to the next, etc., in the general search direction.
Default value: True.

<SearchForward> (optional)

Type: Boolean.
You can use it to define search direction: True - search forward; False - search backward.
Default value: True.

Returned value:

Type: SpreadsheetDocumentRange; SpreadsheetDocumentDrawing; Undefined.
If a value is not found, the Undefined value is returned.

Description:

Searches for value in spreadsheet document cells.

Availability:

Thin client, web-client, server, thick client, external connection, Mobile application (client), Mobile application (server).

Example:

Area = Spreadsheet.FindValue(SelValue);
If 
TypeOf(Area)=Type("Undefined") Then
    Message("Value not found!");
Else
    Message("Value found.");
EndIf
;


    

1C:Enterprise Developer's Community