Spreadsheet data

How to remove text before a character in Excel

2026-06-28
Task

A supplier file stores SKU values with a regional prefix: CA-00123, NY-00456, TX-00789. The final file only needs the code after the dash: 00123, 00456, 00789.

Short answer

Create sku_clean from sku_raw. Add Remove before for the - character, then add Remove substring with - to remove the remaining dash.

How to do it in Eofferix

  1. Upload the CSV or XLSX file with the sku_raw column and open the table editor. The example keeps a product column next to it for row checking.

  2. Create the result column sku_clean from the source column sku_raw.

  3. Open the settings for sku_clean with the gear icon in the column header.

    Opening sku_clean column settings in the Eofferix table editor
    The animation opens the settings of the result column sku_clean.
  4. Add a rule: current value contains -, action Remove before. Then add a second rule: current value contains -, action Remove substring, value -.

    Two Eofferix rules for removing text before a dash and removing the dash
    The first rule keeps the part from the dash onward; the second rule removes the dash.
  5. Save the settings and check the preview: CA-00123 should become 00123, with leading zeros preserved.

Before / after

Before

source data
sku_rawproduct
CA-00123Hudson desk lamp
NY-00456Maple wall shelf
TX-00789Trail travel mug

After

result
sku_cleanproduct
00123Hudson desk lamp
00456Maple wall shelf
00789Trail travel mug

What to keep in mind

  • This setup works when there is one stable separator, such as a dash.
  • If the separator appears more than once, check which part of the value must remain.
  • SKU values stay as text, so identifiers such as 00123 keep their leading zeros.

Process data faster with Eofferix

Create a free account to automate catalogs and price lists around your own rules.

Sign up