Spreadsheet data

How to remove text after a character in Excel

2026-06-28
Task

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

Short answer

Create sku_clean from sku_raw. Add Remove after 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 after. Then add a second rule: current value contains -, action Remove substring, value -.

    Two Eofferix rules for removing text after a dash and removing the dash
    The first rule keeps the beginning of the value up to the dash; the second rule removes the dash.
  5. Save the settings and check the preview: 00123-CA should become 00123, with leading zeros preserved.

Before / after

Before

source data
sku_rawproduct
00123-CAHudson desk lamp
00456-NYMaple wall shelf
00789-TXTrail 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