Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy cell contents, then paste into the same cell with other text. | Excel Discussion (Misc queries) | |||
copy and paste according to cell value | Excel Discussion (Misc queries) | |||
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 | Excel Worksheet Functions | |||
Copy/Paste from once cell to another | Excel Worksheet Functions | |||
Select cell, Copy it, Paste it, Return to Previous cell | Excel Discussion (Misc queries) |