Replace by Regex

Updated at:

Feb 12, 2024

Category:

Text Processing

The Replace by Regex function is a feature that leverages regular expressions (regex) to perform sophisticated search and replace operations across your workbook. It offers the capability to set up multiple replacement rules, allowing you to execute several search-and-replace actions in one go.

See it in Action

Requirements

Data

  • Target Data

    • Data Range: Identify the cells range where you want to apply the function.

    • Columns Included: Check this option if your selected range includes the first row as column headers. This ensures that the first row is recognized as column names and excluded from the processing.

  • Replacement Rules: You have the flexibility to set up multiple replacement rules. To do this, add the necessary forms for each rule you wish to apply.

    • Regex Pattern: Enter the regex you are looking to find within the selected data range.

    • With Text: Specify the new text that will replace the original text you have identified.

Fill empty cells with

  • Keep Empty: Leave cells that are empty as is, without adding any text.

  • Forward Fill: Copy the value from the nearest non-empty cell above into empty cells before adding the specified letters or text.

  • Backward Fill: Copy the value from the nearest non-empty cell below into empty cells before adding the specified letters or text.

  • -: Fill empty cells with a letter "-".

  • 0: Fill empty cells with a letter "0".

  • Custom: Allows for a custom value or text to be inserted into empty cells prior to adding the specified letters.

Result Destination

Specify the starting cell where the results will be placed.

Related Articles and Topics