how to copy and paste cell as a value.

S

shital

i hae code which is working fine. But i have function in
Cell "a1" & "D14" when the code is copy data as a function
how can i copy that two cell as a value.
how to copy and paste cell as a value.

Sub copydate()
Dim lrow As Long

lrow = Sheets("Sheet2").Cells(Rows.Count, "A").End
(xlUp).Offset(1, 0).Row

Worksheets("Sheet1").Range("A1").Copy _
Destination:=Worksheets("Sheet2").Range("A" & lrow)
Worksheets("Sheet1").Range("D4").Copy _
Destination:=Worksheets("Sheet2").Range("B" & lrow)
Worksheets("Sheet1").Range("A14").Copy _
Destination:=Worksheets("Sheet2").Range("C" & lrow)
Worksheets("Sheet1").Range("D14").Copy _
Destination:=Worksheets("Sheet2").Range("D" & lrow)

End Sub
 
H

Harald Staff

Hi

You don't copy, you just say what the value is supposed to be:

Worksheets("Sheet2").Range("A" & lrow).Value = _
Worksheets("Sheet1").Range("A1").Value
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top