Get a Row

Gets a row from an Excel worksheet that contains a specific value.

Overview

This procedure locates and retrieves a row in an Excel worksheet that contains a specific value. A column or a row number can be specified to identify the row.

Syntax

Below is a line-by-line overview of the automation syntax. Expand each line to learn more.

get the worksheet's row

What does it do?

Begins row retrieval from the current worksheet.

Where does it go?

This phrase should be written on a new line.

Is it required?

✅ Yes — This phrase is required.

Does it require data?

✅ Yes — A reference to the worksheet must be defined in the automation.

the row number is x

What does it do?

Specifies which row to retrieve by number.

Where does it go?

Indented under get the worksheet's row where.

Is it required?

❌ No — This phrase is optional.

Does it require data?

✅ Yes — Replace x with a row number (1-based).

Example

the row number is 5
the column label is "A"

What does it do?

Specifies which column to search for the cell value.

Where does it go?

Indented under get the worksheet's row where.

Is it required?

❌ No — This phrase is optional.

Does it require data?

✅ Yes — Replace A with a column label (e.g., "A", "B", "AB"). Must be used with cell value.

Example

the column label is "A"
the cell value is "search-value"

What does it do?

Specifies the value to search for in the specified column.

Where does it go?

Indented under get the worksheet's row where.

Is it required?

❌ No — This phrase is optional.

Does it require data?

✅ Yes — Replace search-value with the value to find. Must be used with column label.

Example

the cell value is "Total"

Examples

1. Get a Row by Specifying a Row Number

get the worksheet's row
    the row number is 23

2. Get a Row by Specifying a Column Label and Cell Value

get the worksheet's row
    the column label is "AB"
    the cell value is "Total:"

Last updated

Was this helpful?