Copy Cells
Yes, pefect. Thanks so much.
"JLGWhiz" wrote:
Ok, I think I understand the problem now. Try this.
Sub CpyMaybe()
lr = Cells(Rows.Count, 16).End(xlUP).Row
For i = 1 To lr 'Assumes no header, change AR
If Cells(i, 16) < Cells(i, 27) Then
Cells(i, 16).Copy
Cells(i, 27).PasteSpecial Paste:=xlValues
End If
Next
End Sub
"Alex" wrote:
it works, but how can I put pastevalues only in the code?
"JLGWhiz" wrote:
This might work:
Sub CpyMaybe()
lr = Cells(Rows.Count, 16).End(xlUP).Row
For i = 1 To lr 'Assumes no header, change AR
If Cells(i, 16) < Cells(i, 27) Then
Cells(i, 16).Copy Cells(i, 27)
End If
Next
End Sub
"Alex" wrote:
After importing rows into Excel, I need to copy the values only of column P
into the same row in column AA, but only if column P has not yet been copied
(only newly appended rows). I've tried many ways unsuccessfully. I'd
appreciate any guidance. Thanks.
|