๐ŸŒ
ExcelTips (ribbon)
excelribbon.tips.net โ€บ T012488_Using_a_Formula_to_Replace_Spaces_with_Dashes.html
Using a Formula to Replace Spaces with Dashes (Microsoft Excel)
December 3, 2022 - If you need a formula to change spaces to some other character, the SUBSTITUTE function fits the bill. Here's how to use it.
Discussions

Find and replace - how to include blank spaces before and after a word you want to replace
u/Old_Pizza_1149 - Your post was submitted successfully. Once your problem is solved, reply to the answer(s) saying Solution Verified to close the thread. Follow the submission rules -- particularly 1 and 2. To fix the body, click edit. To fix your title, delete and re-post. Include your Excel version and all other relevant information Failing to follow these steps may result in your post being removed without warning. I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns. More on reddit.com
๐ŸŒ r/excel
10
1
October 10, 2023
Excel formula to remove space between words in a cell - Stack Overflow
I've a huge data in excel file. For eg: say i've a word like paul son,i've to make it as paulson. ... In some cells ,i've data like mic-li,when this type of words come,it should not replace any thing,it should only remove spaces in between words. ... Save this answer. ... Show activity on this post. Suppose the data is in the B column, write in the C column the formula... More on stackoverflow.com
๐ŸŒ stackoverflow.com
Excel function to remove spaces and replace them with commas
Try find and replace 1st. Replace space with comma More on reddit.com
๐ŸŒ r/excel
6
2
January 4, 2023
how to replace every underscore with a space instead?
You can select all the headers, then press ctrl+f -> replace -> find _ replace with space, replace all Its important to select just the headers otherwise you might replace things outside of headers that wasn't intended More on reddit.com
๐ŸŒ r/excel
8
0
October 17, 2023
People also ask

When is it best to replace spaces with dashes in Excel using a formula?
It's best when you need to standardize text data for consistency or prepare it for systems that don't accept spaces.
๐ŸŒ
template.net
template.net โ€บ excel โ€บ how to replace spaces with dashes in excel using a formula
How to Replace Spaces with Dashes in Excel Using a Formula
Is it possible to apply this formula to an entire column?
Yes, you can apply the SUBSTITUTE formula to an entire column by dragging the fill handle or applying the formula to a column range.
๐ŸŒ
template.net
template.net โ€บ excel โ€บ how to replace spaces with dashes in excel using a formula
How to Replace Spaces with Dashes in Excel Using a Formula
Does the SUBSTITUTE function only work for spaces and dashes?
No, the SUBSTITUTE function in Excel can replace any specified text with any other text in a string.
๐ŸŒ
template.net
template.net โ€บ excel โ€บ how to replace spaces with dashes in excel using a formula
How to Replace Spaces with Dashes in Excel Using a Formula
๐ŸŒ
Avantix Learning
avantixlearning.ca โ€บ home โ€บ how to replace spaces in excel with underscores (_), dashes (-) or other values
How to Replace Spaces in Excel with Underscores (_), Dashes (-) or Other Values
April 13, 2022 - For example, if you want to replace spaces with underscores in cell B1 based on a text string in A1, the formula would be: ... If you need to remove leading and trailing spaces, you can combine the SUBTITUTE function with the TRIM function as follows: ... To convert the formula to text, simply copy and paste the formula as values. If you have Excel 2013 or later, you can also try using Flash Fill to replace spaces.
๐ŸŒ
Ablebits
ablebits.com โ€บ ablebits blog โ€บ excel โ€บ excel formulas โ€บ 3 ways to remove spaces between words / numbers in excel cells
3 ways to remove spaces between words / numbers in Excel cells
In the first cell of the helper column (C2), enter the formula to trim excess spaces =TRIM(A2) Copy the formula across the other cells in the column. Feel free to use some tips from Enter the same formula into all selected cells at a time.
Published: April 21, 2016
Views: 76K
๐ŸŒ
ExcelDemy
exceldemy.com โ€บ home โ€บ excel basics โ€บ how to find and replace space in excel: 5 methods
How to Find and Replace Space in Excel: 5 Methods - ExcelDemy
May 24, 2024 - I hope that when using the SUBSTITUTE function if you can identify the spaces between words, and add the space properly in the formula, your problem will be solved. 3. Let us now discuss how Find and Replace works. Find and Replace is a useful feature to replace spaces between numbers in a cell.
๐ŸŒ
Statology
statology.org โ€บ home โ€บ how to replace space with underscore in excel
How to Replace Space with Underscore in Excel
August 17, 2023 - Then type Ctrl + H to bring up the Find and Replace feature in Excel. Then type a single space in the Find what box and type a single underscore in the Replace with box.
Find elsewhere
๐ŸŒ
Template.net
template.net โ€บ excel โ€บ how to replace spaces with dashes in excel using a formula
How to Replace Spaces with Dashes in Excel Using a Formula
September 2, 2025 - This function is adept at swapping specific text within a text string for your chosen text. The formula structure for SUBSTITUTE is =SUBSTITUTE(text, old_text, new_text, [instance_num]).
๐ŸŒ
Reddit
reddit.com โ€บ r/excel โ€บ find and replace - how to include blank spaces before and after a word you want to replace
r/excel on Reddit: Find and replace - how to include blank spaces before and after a word you want to replace
October 10, 2023 -
  • I have a very long list of names, where the word "and" often appears between the two names. For example, "John and Mary."

  • I want to find every occurrence of the word "and" and replace it with " ^ " (Purpose is to use as delimiter for later splitting text to column, but that is another matter). In the example above, I would like the names to be shown as "John ^ Mary".

  • My problem: I can't figure out how to get Excel to include spaces in the text that I am seeking find and replace. In other words, I want Excel to look for (space)and(space). I have typed it into find like this: " and " << (without the quote marks, but typing a space before and after the word "and").

  • However, Excel ignores the spaces when it does the replacement, which messes up my list.

More info: Issue is, many of the names on my list contain the letters "and", and Excel is finding and replacing those text strings, even though they don't have a space before and after. Example: "John and Sandra" would be replaced with "John ^ S^ra" (instead of "John ^ Sandra). Or, "Andrew" would be replaced with "^rew"

If "find" in Excel also included the spaces you entered, then the problem would be solved, but Excel apparently can't find the spaces. (This is unlike Word, which definitely can find spaces.)

I have been searching for an solution for a long time, can anyone help?

๐ŸŒ
DataCamp
datacamp.com โ€บ tutorial โ€บ how-to-remove-spaces-in-excel
How to Remove Spaces in Excel: 5 Good Methods | DataCamp
March 4, 2026 - It cleans numerical data, such as removing spaces that separate digits. ... Create a helper column. Enter the formula: =SUBSTITUTE(A2," ",""). Press Enter and drag it down to apply it to all rows. Using the SUBSTITUTE() function. Image by Author. If you want a quick and easy fix, Iโ€™d recommend ...
๐ŸŒ
Ablebits
ablebits.com โ€บ ablebits blog โ€บ excel โ€บ excel formulas โ€บ how to remove blank spaces in excel - leading, trailing, non-breaking
How to remove blank spaces in Excel - leading, trailing, non-breaking
March 20, 2023 - For example, when you have imported a numeric column where spaces are used as thousands separators, which makes it easier to read big numbers, but prevents your formulas from calculating. To delete all spaces in one go, use SUBSTITUTE as explained in the previous example, with the only difference that you replace the space character returned by CHAR(32) with nothing (""):
๐ŸŒ
Reddit
reddit.com โ€บ r/excel โ€บ excel function to remove spaces and replace them with commas
r/excel on Reddit: Excel function to remove spaces and replace them with commas
January 4, 2023 -

Hi, I have a large data set of numbers which have spaces in between, and I want to remove the spaces and replace them with commas (effectively making me able to sum them up for instance). Which formula can I use?

๐ŸŒ
The Bricks
thebricks.com โ€บ home โ€บ resources โ€บ how to replace space in excel
How to Replace Space in Excel
February 20, 2025 - Why Do Extra Spaces Cause Problems in Excel?Method 1: The Quick Fix with Find and ReplaceMethod 2: Precise Control with the SUBSTITUTE FunctionMethod 3: The Best Overall Fix Using the TRIM FunctionMethod 4: The Repeatable Workflow with Power QueryFinal Thoughts ยท Cleaning up text in Excel often starts with tackling unwanted spaces. Whether it's extra spaces at the beginning of a cell, double spaces between words, or sneaky trailing spaces you can't even see, these little nuances can wreak havoc on your formulas, sorting, and filtering.
๐ŸŒ
Excel Tips
excel.tips.net โ€บ T012487_Using_a_Formula_to_Replace_Spaces_with_Dashes.html
Using a Formula to Replace Spaces with Dashes (Microsoft Excel)
March 31, 2018 - If you need a formula to change spaces to some other character, the SUBSTITUTE function fits the bill. Here's how to use it. (Tips.Net)
๐ŸŒ
The Bricks
thebricks.com โ€บ home โ€บ resources โ€บ how to replace spaces with underscores in excel
How to Replace Spaces with Underscores in Excel - Bricks
February 12, 2025 - This formula tells Excel to look at cell A2, find every space character (" "), and replace each one with an underscore ("_").
๐ŸŒ
MrExcel
mrexcel.com โ€บ forums โ€บ question forums โ€บ excel questions
Excel formula - remove commas, hyphens, spaces and replace with underscore | MrExcel Message Board
July 4, 2020 - Expected output: Reyes_MaLuisa_Text123; JunOh_Junee_Text123; Carter_JohnJr_Text 123 (no period and trailing space removed) Formula used: =REPLACE(I2,FIND(", ",I2,1),2,"_") & "_Text123" where I is the name field.
๐ŸŒ
Arab Psychology
scales.arabpsychology.com โ€บ home โ€บ replace space with underscore in excel
Replace Space With Underscore In Excel
November 18, 2025 - The combined formula would look like this: =SUBSTITUTE(TRIM(A2), โ€ โ€œ, โ€œ_โ€). This nested approach first normalizes the spacing and then performs the precise space-to-underscore conversion, resulting in perfectly clean data.