ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Replace "dash" with "space" (https://www.excelbanter.com/excel-discussion-misc-queries/229419-replace-dash-space.html)

Turkey

Replace "dash" with "space"
 
What is the formula to replace "-" with space starting to count from the
right side. I need this to be done in a whole column

Bob Phillips[_3_]

Replace "dash" with "space"
 
=SUBSTITUTE(B1," ","-",LEN(B1)-LEN(SUBSTITUTE(B1," ","")))

and copy down

--
__________________________________
HTH

Bob

"Turkey" wrote in message
...
What is the formula to replace "-" with space starting to count from the
right side. I need this to be done in a whole column




Don Guillett

Replace "dash" with "space"
 
How about a nice macro?

Sub replacedashwithspace()
Columns("c").Replace "-", " "
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Turkey" wrote in message
...
What is the formula to replace "-" with space starting to count from the
right side. I need this to be done in a whole column




All times are GMT +1. The time now is 07:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com