Access Beginner
Active Member
- Joined
- Nov 8, 2010
- Messages
- 311
- Office Version
- 2016
- Platform
- Windows
Hi All,
I have recorded a macro which replaces the "Zone" with "" and Numeric Values with "".
Zone names are Zone 01 to Zone 16.
Is there a better way to do this via VBA?
This data set will grow by at least 3,000 rows per month and is an export from another product which I have no input or control over.
I have recorded a macro which replaces the "Zone" with "" and Numeric Values with "".
Zone names are Zone 01 to Zone 16.
Is there a better way to do this via VBA?
This data set will grow by at least 3,000 rows per month and is an export from another product which I have no input or control over.
Code:
Sub Find_And_Replace_II()
'
' Find_And_ReplaceII Macro
'
'
Sheets("ISR Output by Zone").Select
Range("G1:G100000").Select
Selection.Replace what:="Zone", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Sheets("ISR Output by Zone").Select
Range("G1:G100000").Select
Selection.Replace what:="1", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Sheets("ISR Output by Zone").Select
Range("G1:G100000").Select
Selection.Replace what:="2", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Sheets("ISR Output by Zone").Select
Range("G1:G100000").Select
Selection.Replace what:="3", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Sheets("ISR Output by Zone").Select
Range("G1:G100000").Select
Selection.Replace what:="4", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Sheets("ISR Output by Zone").Select
Range("G1:G100000").Select
Selection.Replace what:="5", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Sheets("ISR Output by Zone").Select
Range("G1:G100000").Select
Selection.Replace what:="6", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Sheets("ISR Output by Zone").Select
Range("G1:G100000").Select
Selection.Replace what:="7", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Sheets("ISR Output by Zone").Select
Range("G1:G100000").Select
Selection.Replace what:="8", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Sheets("ISR Output by Zone").Select
Range("G1:G100000").Select
Selection.Replace what:="9", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Sheets("ISR Output by Zone").Select
Range("G1:G100000").Select
Selection.Replace what:="0", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
End Sub