logandiana
Board Regular
- Joined
- Feb 21, 2017
- Messages
- 107
Here's a short section of my code.
Once it pastes into J2 on temp it doesn't seem to do the following lines of code.
The code doesn't stop, it just ignores it.
LR3 does get defined.
If I put select in there, like this
it works as it should, but why do I need to do that for it to work.
Code:
With comp
.Range("A1").PasteSpecial xlPasteValues
.Rows("1:3").Delete
.Columns("B:B").Delete
.Columns("A:B").RemoveDuplicates Columns:=Array(1, 2), Header:=xlNo
LR2 = comp.Cells(Rows.Count, 1).End(xlUp).Row
.Range("A1:B" & LR2).Copy
End With
With temp
.Range("J2").PasteSpecial xlPasteValues
LR3 = temp.Cells(Rows.Count, 10).End(xlUp).Row
.Range("Z2:Z" & LR3).Value = Range("K2:K" & LR3).Value
.Range("K2:K" & LR3).Value = Range("J2:J" & LR3).Value
Once it pastes into J2 on temp it doesn't seem to do the following lines of code.
The code doesn't stop, it just ignores it.
LR3 does get defined.
If I put select in there, like this
Code:
With temp
.Select
.Range("J2").PasteSpecial xlPasteValues
LR3 = temp.Cells(Rows.Count, 10).End(xlUp).Row
.Range("Z2:Z" & LR3).Value = Range("K2:K" & LR3).Value
.Range("K2:K" & LR3).Value = Range("J2:J" & LR3).Value