# Lookup Data Table

> `UiPath.Core.Activities.LookupDataTable`

`UiPath.Core.Activities.LookupDataTable`

## Description

This activity emulates the behaviour of the VLOOKUP Excel formula. It enables you to search for a provided value in a specified `DataTable` and returns the **RowIndex** at which it was found. If the provided value is not found, then the returned **RowIndex** is -1. This activity can also help you return the value found in the cell that has the row coordinates specified in the **RowIndex** property and the column coordinates specified in the **Target Column** property category.

## Project compatibility

**Windows - Legacy** | **Windows** | **Cross-platform**

## Cross-platform configuration

* **Find This Value** - The value you want to search for in the DataTable. Only supports String values.
* **In this Data Table** - The DataTable in which the lookup is performed.
* **In the Column Name** - The name of the column you want to search for in the DataTable set above. You can switch between using a **Column Name** or **Column Number** from the "**+**" menu next to the input field.
* **Return Value From Column Name** - Returns the value of the cell found at the coordinates between this value and the RowIndex property. If the target column is not set, the cell value is null. You can switch between using a **Return Value From Column Name** or **Return Value From Column Number** from the "**+**" menu next to the input field.

## In the Properties Panel

**Output**
* **Found Cell Value** - The value found in the cell that has the Row coordinates specified in the `RowIndex` property and the column coordinates specified in the Target Column property category. The output type matches the source data type and is resolved dynamically during runtime based on the source DataTable. To avoid issues with type conversion, please make sure the variable assigned to this property matches the expected variable type of the source DataTable.
* **Found Row Number** - The row number of the found cell.

## Windows, Windows - Legacy configuration

**Properties Panel**

#### **Common**

* **DisplayName** - The display name of the activity.

#### **Input**

* **DataTable** - The `DataTable` variable in which you want to perform the lookup. This field supports only `DataTable` variables.
* **LookupValue** - The value you want to search for in the specified `DataTable` variable. This field supports only strings and `String` variables.

#### **Lookup Column**

* **Column** - The variable containing the column you want to search for. This field supports only `DataColumn` variables. **Setting a variable in this property field disables the other two properties**.
* **ColumnIndex** - The index of the column you want to search for. This field supports only `Int32` variables. **Setting a variable in this property field disables the other two properties**.
* **ColumnName** - The name of the column you want to search for. This field supports only strings and `String` variables. **Setting a variable in this property field disables the other two properties**.

#### **Misc**

* **Private** - If selected, the values of variables and arguments are no longer logged at Verbose level.

#### **Output**

* **CellValue** - Optional. The value found in the cell that has the Row coordinates specified in the `RowIndex` property and the column coordinates specified in the Target Column property category. The output type matches the source data type and is resolved dynamically during runtime based on the source DataTable. To avoid issues with type conversion, please make sure the variable assigned to this property matches the expected variable type of the source DataTable.
* **RowIndex** - The Row index of the found cell, stored in an `Int32` variable. If the provided value is not found, the Row index is -1. This field supports only `Int32` variables.

#### **Target Column**

* **Column** - Specifying a `DataColumn` variable here returns the value of the cell found at the coordinates between this column and the value from the **RowIndex** property. This field supports only `DataColumn` variables. **Setting a variable in this property field disables the other two properties**.
* **ColumnIndex** - Specifying a Column index here returns the value of the cell found at the coordinates between this column and the value from the **RowIndex** property. This field supports only `Int32` variables. **Setting a variable in this property field disables the other two properties**.
* **ColumnName** - Specifying a Column name here returns the value of the cell found at the coordinates between this column and the value from the **RowIndex** property. This field supports only strings and `String` variables. **Setting a variable in this property field disables the other two properties**.
