Im having a hard to figuring out how to narrow the "selection.replace" code in my macro to only search one sheet of my workbook. My thought was prior to this line including Range ("").Select would give the "selection.replace" a defined area to work in but that appears to be untrue.
FYI: i am working in excel 2003, Old, outdated i know, but until I outgrow potential of this program i cannot justify the cost of the newest edition.
Here is the macro being used to condense information on multiple sheets to one sheet, then to exclude empty data replace "x" and "0" with blank cells.
Code
Application.ScreenUpdating = False
Range("AM2:BD50").Select
Selection.Copy
Range("A2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("A2:C50").Select
Application.CutCopyMode = False
Selection.Sort Key1:=Range("A2"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("D2:F50").Select
Selection.Sort Key1:=Range("D2"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("G2:I50").Select
Selection.Sort Key1:=Range("G2"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("J2:L50").Select
Selection.Sort Key1:=Range("J2"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("M2:O50").Select
Selection.Sort Key1:=Range("M2"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("P2:R50").Select
Selection.Sort Key1:=Range("P2"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("schedule").Select
Selection.Replace What:="x", Replacement:="", LookAt:=xlWhole, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Selection.Replace What:="0", Replacement:="", LookAt:=xlWhole, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Range("AN53:AZ81").Select
Selection.Copy
Range("B53").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("A51").Select
Display More