Data Import & Export

How to Invert Number Signs in Excel Cells Containing Text and Numbers

Natalie TaylorNatalie Taylor Oct 22, 2026 869 views

Question details

The user needs to import data containing mixed text and numbers, separate the characters from the numbers, invert the mathematical signs of the numeric values, and export the final result.

How to Invert Number Signs in Excel Cells Containing Text and Numbers
Product
Excel
Device & OS
not provided
Scenario
Importing and cleaning text-file data containing combined text and numeric values.
Observed behavior
Data is imported as mixed strings. The goal state is to have the letters and numbers separated, with the numbers' signs inverted (positive to negative or vice versa) for third-party application export.
Before you start

Ensure your original text file is saved locally and identify the consistent delimiter (e.g., an equals sign, comma, or space) used between your text and numeric values.

Solution 1Recommended

Use Power Query to Separate Text and Invert Numeric Signs

Power Query is the most efficient way to import, split, and transform mixed data columns in Excel.

Power Query allows you to automate the process of cleaning mixed-format data. By utilizing its splitting and mathematical transformation tools, you can easily separate strings from integers and flip the positive or negative status of the numbers.

1
Import the Data

Go to the Data tab on the Excel ribbon, click 'Get Data' (or 'From Text/CSV'), and select your source text file.

2
Apply Delimiters

In the import window, choose the appropriate delimiter (such as an equals sign '=') to split the initial data, then click 'Transform Data' to open the Power Query Editor.

3
Clean Unwanted Characters

Use the 'Replace Values' feature under the Transform tab to remove any unwanted characters, such as braces or extra commas, by replacing them with a blank space.

4
Split Text and Numbers

Select the column with mixed data, click 'Split Column' in the Home tab, and choose to split by delimiter or by transitioning from non-digit to digit. Ensure the resulting numeric column is set to the 'Whole Number' or 'Decimal Number' data type.

5
Invert the Number Signs

Select the newly created numeric column, go to the Transform tab, click 'Standard' under the Number Column group, select 'Multiply', and enter '-1' to invert the signs.

6
Load and Export

Click 'Close & Load' to return the transformed data to your Excel spreadsheet. You can now go to File > Save As and save the document as a .txt or .csv file for your third-party application.

Use Power Query to Separate Text and Invert Numeric Signs
Automated Updates: If your source text file updates in the future, you can simply click 'Refresh All' in the Data tab to apply these exact transformations to the new data.
Efficient Data Processing with WPS Office

Easily Separate Text and Invert Numbers in WPS Spreadsheet

WPS Spreadsheet offers powerful Data import wizards, Text-to-Columns capabilities, and Paste Special operations to help you clean and transform mixed data quickly.

  1. 1. Import the Text File: Open WPS Spreadsheet, navigate to the 'Data' tab, and click 'Import Data' to locate and open your source text file.
  2. 2. Split the Data: Highlight your imported data column, click 'Text to Columns' under the Data tab, and select the appropriate delimiter (like '=' or a space) to separate the text from the numbers.
  3. 3. Copy a Negative Multiplier: Type '-1' into an empty cell anywhere on the spreadsheet and copy that cell (Ctrl + C).
  4. 4. Invert the Signs: Highlight your newly separated numeric column, right-click, and choose 'Paste Special'. Under the Operation section, select 'Multiply' and click OK to instantly flip all the signs.
  5. 5. Export the File: Go to 'Menu' > 'Save As' and select a plain text format (.txt or .csv) to export your finalized data.
Highly compatible with Microsoft Excel (.xlsx) formats and standard text files (.csv, .txt).Intuitive Text-to-Columns wizard to separate text and numbers effortlessly.Paste Special feature allows quick batch multiplication to invert signs without complex queries.Free, lightweight, and features a familiar user interface for immediate productivity.
microsoft office alternative - wps office

Frequently Asked Questions

Why did Power Query format my extracted numbers as text?

When splitting columns, Power Query might retain the original text format. You need to explicitly change the column data type to 'Whole Number' or 'Decimal Number' by clicking the ABC/123 icon in the column header before attempting to multiply by -1.

Can I invert number signs without using Power Query?

Yes. You can use the 'Text to Columns' tool in the Data tab to split your text and numbers into separate columns. Afterwards, type -1 in a blank cell, copy it, select your numbers, and use 'Paste Special' > 'Multiply' to flip the signs.

How do I remove unwanted braces from my data before splitting?

In the Power Query Editor, select the column containing the braces, go to the Transform tab, click 'Replace Values', enter the brace character (e.g., '{' or '}') in the 'Value To Find' box, leave the 'Replace With' box blank, and click OK.

What delimiter should I use when importing the text file?

You should select the specific character that naturally separates the text from the numbers in your dataset. Look at your raw data; common delimiters include commas, spaces, dashes, or equals signs.