Skip to main content

Merge/split cells

Sophie avatar
Written by Sophie
Updated over a week ago

Definition and Usage

This command allows you to merge multiple cells into a single cell or split previously merged cells in a specified range within an Excel worksheet. When merging cells, you can choose to center the content of the merged cells for better visual presentation.


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 the "Launch Excel" or "Get active Excel worksheet" command

Worksheet name

Specify the worksheet name

No

Leave blank to use the active worksheet

Merge / Split

Choose whether to merge or split the selected cells

Merge cells, Split cells

Yes

Range start row

The starting row number of the selected range for merging or splitting cells

Yes

Can use numeric values

Range end row

The ending row number of the selected range for merging or splitting cells

Yes

Can use numeric values

Range start column

The starting column number or name of the selected range for merging or splitting cells

Yes

Can use column letters (A, B, C) or numbers

Range end column

The ending column number or name of the selected range for merging or splitting cells

Yes

Can use column letters (A, B, C) or numbers

Centered after merging

Check this option to center the content of merged cells

No

Only applicable when merging cells

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

This action doesn't produce any variables.


Using Variables in Conditions

You can use variables for any parameter by clicking the {x} button next to the input field. This allows you to dynamically specify values such as cell ranges based on previously defined variables. For example, you might use a variable to define the start row or column based on a search result from a previous action.


Notes

  • Before using this command, ensure that a valid Excel instance has been created using "Launch Excel" or "Get active Excel worksheet" command.

  • When merging cells, only the content of the top-left cell in the range will be preserved; content in other cells will be lost.

  • The range can be specified using row numbers and column letters (A, B, C) or column numbers (1, 2, 3).

  • If attempting to split cells that were not previously merged, no action will be taken.

  • For large ranges, the operation may take some time to complete.

Did this answer your question?