Removing specific charectors

wmtsub

Active Member
Joined
Jun 20, 2018
Messages
322
How would I search colum n and remove "-" from all cells in the range N2-[lastrow]?
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
How would I search colum n and remove "-" from all cells in the range N2-[lastrow]?
Does cell N1 have dashes in it that must be preserved?

Are you looking for a macro solution or a manual procedure?
 
Upvote 0
it is a list of #'s and I would like to remove anything that is not a number. A macro would be preferred.
 
Upvote 0
it is a list of #'s and I would like to remove anything that is not a number. A macro would be preferred.
Your original post said you wanted to remove dashes from Column N but the above makes it sound like you have text other than dashes mixed with the numbers... is that the case? If so, is the other text simply other symbols (like slashes, colons, etc.) or are we talking varying text (like words)? Please describe what is in the cells (numbers in some, text in others, a mix of text and numbers in some others) so we know what we have to work around. Remember, we cannot see your work sheet so we have no idea what your data looks like... all we know is what you tell us, so be complete when describing your data.
 
Upvote 0
the "-" is my main concern. The other was an after thought.
Here is a macro that will remove all dashes from Column N starting at Row 2...
Code:
[table="width: 500"]
[tr]
	[td]Sub RemoveDashesFromColumnN()
  Range("N2", Cells(Rows.Count, "N").End(xlUp)).Replace "-", "", xlPart,,,,False
End Sub[/td]
[/tr]
[/table]
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top