Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default how to copy and paste cell as a value.

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default how to copy and paste cell as a value.

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

--
HTH. Best wishes Harald
Followup to newsgroup only please

"****al" skrev i melding
...
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy cell contents, then paste into the same cell with other text. bluenote31 Excel Discussion (Misc queries) 4 February 9th 10 09:18 PM
copy and paste according to cell value saman110 via OfficeKB.com Excel Discussion (Misc queries) 2 January 10th 08 02:58 PM
How can I copy a value from a cell and paste it into another cell while adding it to the previous value in that cell [email protected] Excel Worksheet Functions 2 November 7th 07 09:39 AM
Copy/Paste from once cell to another ebraun01 Excel Worksheet Functions 7 January 27th 06 09:30 PM
Select cell, Copy it, Paste it, Return to Previous cell spydor Excel Discussion (Misc queries) 1 December 30th 05 01:29 PM


All times are GMT +1. The time now is 10:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"