Thread: Copy Cells
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default Copy Cells

Cells(i, 16).Copy Cells(i, 27)

This line copies and pastes in one action. What other paste do you want to
do.
Maybe I didn't understand the question.

"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.