G
Guest
Hi folks
I have a sub that should delete 3 from the strings in a selected range of
cells. It works for a single cell ( only if I if I include the
ActiveCell.Select line)
I get a message "Replace method of Range failed" with more than 1 cell
selected.
Please could anyone explain why it does not work with more than 1 selected
cell, and how I could get it to workfor a selection of cells?
Sub delete3()
Worksheets("Sheet1").Activate
'ActiveCell.Select
Selection.Replace What:="3", Replacement:="", LookAt:=xlPart,
SearchOrder:=xlByRows, MatchCase:=False
End Sub
Thanks
I have a sub that should delete 3 from the strings in a selected range of
cells. It works for a single cell ( only if I if I include the
ActiveCell.Select line)
I get a message "Replace method of Range failed" with more than 1 cell
selected.
Please could anyone explain why it does not work with more than 1 selected
cell, and how I could get it to workfor a selection of cells?
Sub delete3()
Worksheets("Sheet1").Activate
'ActiveCell.Select
Selection.Replace What:="3", Replacement:="", LookAt:=xlPart,
SearchOrder:=xlByRows, MatchCase:=False
End Sub
Thanks