Captain Smith
Active Member
- Joined
- Feb 28, 2003
- Messages
- 324
This code does not work. It performs and does not error, but the replacement does not happen. I want this to act on each of the selected cells and replace on the entire
worksheet the value in the current cell with the value in the cell to the immediate
left. What is missing with this code??? Thanks.
Sub my_macro()
Dim cell As Range
For Each cell In Selection
Cells.Replace What:=cell, Replacement:=cell.offset(0,-1), LookAt:=xlPart _
, ReplaceFormat:=False
Next
End Sub
worksheet the value in the current cell with the value in the cell to the immediate
left. What is missing with this code??? Thanks.
Sub my_macro()
Dim cell As Range
For Each cell In Selection
Cells.Replace What:=cell, Replacement:=cell.offset(0,-1), LookAt:=xlPart _
, ReplaceFormat:=False
Next
End Sub