SUBSTITUTE it is easy to use
=SUBSTITUTE( SUBSTITUTE(I2,",","_") ," ","_")
Answer from Mo Khalefa on Stack OverflowStatology
statology.org βΊ home βΊ how to replace space with underscore in excel
How to Replace Space with Underscore in Excel
August 17, 2023 - Another way to replace spaces with underscores in Excel is to use the SUBSTITUTE function. We can type the following formula into cell B2 to replace each space in cell A2 with an underscore:
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.
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
Excel formula - remove commas, hyphens, spaces and replace with underscore
I have data like this: Reyes, Ma. Luisa Jun-Oh, Junee Carter, John Jr. I need to use a combination of excel formulas in one cell to remove commas, periods, spaces and replace with underscore. Also need to add text after the names (to be used as PDF filename). Expected output... More on mrexcel.com
vba - Replace Underscores characters with Space inside a String value - Stack Overflow
This is a rather simple question. I have a date variables formated like: 25_December_2010 I would like a statement or a bit of code in the VBA macro that will transform that string value from: More on stackoverflow.com
Probably simple answer: Named Range reference with a space?
If you're using a function, why not just replace the spaces? If the dropdown selection is "My Named Range" have the formula referencing the dropdown selection be =INDIRECT(SUBSTITUTE("My Named Range", " ", "_")) which gives =INDIRECT("My_Named_Range") More on reddit.com
Reddit
reddit.com βΊ r/excel βΊ how to replace every underscore with a space instead?
r/excel on Reddit: how to replace every underscore with a space instead?
October 17, 2023 -
I have TONS of headers that look like the following
owner2_address_1_city
There underscores instead of spaces make it hard to read quickly and make wrapping text useless. is there an easy way to change it to normal text i.e. below:
"owner 2 address 1 city"
Thanks in advance!
Top answer 1 of 3
6
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
2 of 3
1
u/Possible_Spy - 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.
ExtendOffice
extendoffice.com βΊ home βΊ office tips βΊ excel tips
How to replace blank space with nothing/underscore/dash/comma in Excel?
August 29, 2024 - 1. Open all workbooks you will ... pane, go to the Replace tab, and: (1) In the Find what box, please type a space; (2) In the Replace with box, type underscore/dash/comma as you need....
MrExcel
mrexcel.com βΊ forums βΊ question forums βΊ excel questions
Excel formula - remove commas, hyphens, spaces and replace with underscore | MrExcel Message Board
July 4, 2020 - let Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content], #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}}), #"Replaced Value" = Table.ReplaceValue(#"Changed Type",",","_",Replacer.ReplaceText,{"Column1"}), #"Replaced Value1" = Table.ReplaceValue(#"Replaced Value",".","_",Replacer.ReplaceText,{"Column1"}), #"Replaced Value2" = Table.ReplaceValue(#"Replaced Value1"," ","_",Replacer.ReplaceText,{"Column1"}), #"Added Suffix" = Table.TransformColumns(#"Replaced Value2", {{"Column1", each _ & "Text123", type text}}) in #"Added Suffix" ... My data consists of Lastname then a comma and space. Firstly I need the last name to not have spaces or other special characters, then an underscore after.
YouTube
youtube.com βΊ watch
Replace space with underscore in Excel - YouTube
The video offers a quick tutorial on how to replace space with underscore in Excel.
Published: June 12, 2022
Excel Forum
excelforum.com βΊ excel-general βΊ 728119-how-to-copy-text-from-another-cell-and-replace-space-with-underscore.html
How to copy text from another cell and replace space with underscore
1) Copy the cell(s) to the new location 2) Do a CTRL-H (search replace) to search for spaces and replace with underscores. To do it in a formula: =SUBSTITUTE(A1, " ", "_") ... Microsoft MVP 2010 - Excel Visit: Jerry Beaucaire's Excel Files & Macros If you've been given good help, use the icon ...
YouTube
youtube.com βΊ pdf tutorial
How to replace space with underscore in excel - YouTube
Assalamu Walaikum,In this video I will show you, How to replace space with underscore in excel. Let's get started.I hope you enjoyed this video please subsc...
Published: May 13, 2024
Views: 1
YouTube
youtube.com βΊ watch
Replace Spaces with a Dash or Underscore in Excel (3 Ways) - YouTube
Video outlines 3 ways to replace spaces with a dash or underscore in Excel. Methods covered include find and replace, the SUBSTITUTE function, and flash fill...
Published: August 25, 2022
The Bricks
thebricks.com βΊ home βΊ resources βΊ how to replace spaces with underscores in excel using ai
How to Replace Spaces with Underscores in Excel Using AI
February 20, 2025 - You should see the text from A2, but with all spaces replaced by underscores. For instance, "Product Number" becomes "Product_Number." Click on cell B2 again. Hover your mouse over the small green square at the bottom-right corner of the cell (the "fill handle"). Your cursor will turn into a small black plus sign. Click and drag the fill handle down to apply the formula to all the corresponding rows of your data. Alternatively, you can just double-click the fill handle, and Excel will automatically fill it down to the last row of your adjacent data.
Top answer 1 of 2
12
As I mentioned in comments, use code below:
Dim strDate As String
strDate = "25_December_2010"
strDate = Replace(strDate,"_"," ")
2 of 2
0
I wanted something similar in a macro I'm using for data cleaning so I took @simoco's answer and created a simple but mostly safe macro/sub.
Sub ConvertSpaceToUnderscore()
Dim strCellValue As String
' Use basic error handling if more than 1 cell is selected, or
' possibly if something that isn't a cell is selected.
On Error GoTo SelectionTooBig
strCellValue = Selection.Value
strCellValue = Replace(strCellValue, " ", "_")
Selection.Value = strCellValue
On Error GoTo 0
' Exit the sub if things went well
Exit Sub
SelectionTooBig:
MsgBox "Please select one cell at a time.", vbCritical, "Selection too large"
End Sub