View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Ray at[_2_] Ray at[_2_] is offline
external usenet poster
 
Posts: 13
Default Deleting Hyphens or Dashes from multiple cells without deleting the remaining content

This is one way:


Set theRange = Sheet1.Range("A1:D4") ''your range here
For Each oCell In theRange
oCell.Value = Replace(oCell.Value, "-", "")
Next
Set theRange = Nothing

--

Ray at home
Microsoft ASP MVP


"rmaloy " wrote in message
...
I have a column in excel that has a list of circuit id's. All of these
have hyphens/dashes in them and some are in different locations. (Ex.
13-44M-121-0001, 13-44M1-210-0001) Is there anyway to delete all of the
hyphens/dashes, without having to go into each cell individually? I
still need the characters to remain in order, just without the hyphens.
(Ex. 1344M1210001, 1344M12100001)

Thanks!


---
Message posted from http://www.ExcelForum.com/