mrmmickle1
Well-known Member
- Joined
- May 11, 2012
- Messages
- 2,461
I have data that resembles this format:
GX14-526544
RF14-26547
UC14-659681
I am trying to replace these strings in each cell so they are now:
526544
26547
659681
I am using this method currently:
The problem is that it is taking an extensive period of time. I have already set ScreenUpdating = False. Is there a way to do this string replacement all at once without having to cycle through each individual cell? My data contains several thousand rows.
Any advice or help would be much appreciated. Thanks!
GX14-526544
RF14-26547
UC14-659681
I am trying to replace these strings in each cell so they are now:
526544
26547
659681
I am using this method currently:
Code:
[COLOR=#0000ff]For[/COLOR] x = 2 [COLOR=#0000ff]To [/COLOR]LastRow [COLOR=#0000ff]Step[/COLOR] 1
Cells(x, 2).Value = Right(Cells(x, 2).Value, Len(Cells(x, 2).Value) - InStr(Cells(x, 2).Value, "-"))
[COLOR=#0000ff] Next [/COLOR]x
The problem is that it is taking an extensive period of time. I have already set ScreenUpdating = False. Is there a way to do this string replacement all at once without having to cycle through each individual cell? My data contains several thousand rows.
Any advice or help would be much appreciated. Thanks!