Skip to main content

Find/Replace data

Sophie avatar
Written by Sophie
Updated over a week ago

Definition and Usage

The Find/replace data command searches for specific text within an Excel worksheet and optionally replaces it. This command allows you to search within an entire worksheet, a specific row, or a specific column, and can be configured to find either the first occurrence or all matches of the specified text.


Parameter Values

Input parameters

Parameter

Description

Possible Values

Required

Options / Notes

Excel instance

Please select an Excel instance to identify the instance to operate on

Yes

Must be created via "Launch Excel" or "Get active Excel worksheet" command

Worksheet name

Specify the worksheet name

No

Leave blank for the active worksheet

Action

Choose whether to search only or to search and replace

Find, Find and Replace

Yes

Search scope

Define the area of the Excel file to search within

Worksheet, Row, Column

Yes

Row

Specify the row number

Conditional

Required if Search scope is "Row"; Use 1 for first row, -1 for last row

Column

Specify the column

Conditional

Required if Search scope is "Column"; Use number (1 = first, -1 = last) or letter (A, B, C)

Search text

Enter the text to search for in the specified area

Yes

Match type

Select how the search text should match the cell content

Equals, Contains

Yes

Match count

Choose whether to return only the first match or all matching results

First, All

Yes

Replace with

Text to replace the matched content with

Conditional

Required if Action is "Find and Replace"

Error handling

Parameter Name

Description

Throw error & stop

When an error occurs, the action will trigger an error and stop the execution of the entire app.

Retry command

If an error occurs, the action will retry the command in an attempt to resolve the issue and continue the process.

Ignore error & continue

When an error occurs, the action will be ignored, and the workflow will continue without interruption.

Variables produced

Store matched cells as: Stores matched cells in a variable as a string (single) or list (multiple). Returns empty if no match is found.


Using Variables in Conditions

You can use variables in various parameters by clicking on the {x} icon to insert previously created variables. This is particularly useful when you need to dynamically set search text or replacement values based on data from previous steps in your workflow.


Notes

  • Before using this command, ensure that a valid Excel instance has been created and the target file is open.

  • If the specified worksheet name cannot be found, the command will result in an error.

  • When searching in a specific row or column, make sure the specified row/column exists in the worksheet.

  • The match type "Equals" requires the entire cell content to match the search text exactly, while "Contains" will find cells where the search text appears anywhere within the cell content.

  • When "Match count" is set to "All", the output variable will be a list of all matched cell values.

Did this answer your question?