Melrose0507
New Member
- Joined
- Jul 19, 2011
- Messages
- 22
Hello,
I am having trouble with one part of my macro. The marco is searching column I for the word "TXT". When it finds it, I want it to cut it from I and insert in column L. I need the original cell in column I deleted so every cell to the right will shift left. This is what I have.
Dim LR As Long, i As Long
LR = Range("H" & Rows.Count).End(xlUp).Row
For i = LR To 2 Step -1
With Range("H" & i)
If Cells(i, "H").Value = "TXT" Then .Cut Destination:=shift.Cells(1, i + 4)
End With
Next i
I know the part in red is incorrect but not sure how to code it. I appreciate the assistance.
I am having trouble with one part of my macro. The marco is searching column I for the word "TXT". When it finds it, I want it to cut it from I and insert in column L. I need the original cell in column I deleted so every cell to the right will shift left. This is what I have.
Dim LR As Long, i As Long
LR = Range("H" & Rows.Count).End(xlUp).Row
For i = LR To 2 Step -1
With Range("H" & i)
If Cells(i, "H").Value = "TXT" Then .Cut Destination:=shift.Cells(1, i + 4)
End With
Next i
I know the part in red is incorrect but not sure how to code it. I appreciate the assistance.