Hi
I have a macro that replaces a few different words within a range of cells. It works fine but I was wondering if anyone would have a different approach to make it quicker?
This is the code i have currently:
Sub Sort1()
Application.ScreenUpdating = False
ActiveSheet.Unprotect
Dim myRange As Range
Set myRange = Range("E:CI")
With myRange
.Replace What:="Completed", Replacement:="pass", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
.Replace What:="Available", Replacement:="x", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
.Replace What:="Not Started", Replacement:="x", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
.Replace What:="Refreshed", Replacement:="x", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
.Replace What:="Started", Replacement:="x", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
.Replace What:="Expired", Replacement:="x", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
End With
Application.ScreenUpdating = True
End Sub
Any suggestions appreciated
Thanks
JSantos
I have a macro that replaces a few different words within a range of cells. It works fine but I was wondering if anyone would have a different approach to make it quicker?
This is the code i have currently:
Sub Sort1()
Application.ScreenUpdating = False
ActiveSheet.Unprotect
Dim myRange As Range
Set myRange = Range("E:CI")
With myRange
.Replace What:="Completed", Replacement:="pass", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
.Replace What:="Available", Replacement:="x", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
.Replace What:="Not Started", Replacement:="x", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
.Replace What:="Refreshed", Replacement:="x", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
.Replace What:="Started", Replacement:="x", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
.Replace What:="Expired", Replacement:="x", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
End With
Application.ScreenUpdating = True
End Sub
Any suggestions appreciated
Thanks
JSantos