How to remove space in between numbers in excel
Method 1: Using Find & Replace - Spacebar & Empty
This method is the quickest as it doesn't require a helper column.
- Select the cell, range, or entire column where you want to remove the spaces.
- Press
Ctrl+H(orCmd+Hon a Mac) to open the "Find and Replace" dialog box. - In the "Find what" field, press the spacebar once to insert a single space character.
- Ensure the "Replace with"field iscompletely empty.
- Click the "Replace All" button. A confirmation message will appear showing how many replacements were made.
- Method 2: Using the SUBSTITUTE FunctionThe
SUBSTITUTEfunction creates a new cell with the data cleaned, leaving your original data untouched until you copy the new values over.- Click an empty cell in a new column (a "helper column") next to your data.
- In that cell, enter the formula
=SUBSTITUTE(A1," ",""), replacingA1with the address of the first cell containing the numbers with spaces.A1: The cell containing the data with spaces." ": A space character enclosed in quotes (what you are finding)."": Two double quotes with nothing in between (what you are replacing the space with).
- Press
Enter. The new cell will display the number without any spaces. - Auto-fill this formula down the column for all relevant cells: select the cell with the formula and double-click the small square (fill handle) in the bottom-right corner of the cell boundary.
- (Optional but Recommended) To replace the original data with the new clean data, copy the helper column, then right-click the original column's first cell and use Paste Special > Values. You can then delete the helper column.
Comments
Post a Comment