ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   macro adjustment help (https://www.excelbanter.com/excel-programming/291296-macro-adjustment-help.html)

scott23

macro adjustment help
 
Hi,
I have the following macro that copies data from one line of a
worksheet and the pastes it to another worksheet immediately after the
last line that contains data. It then erases only certin cells of the
1st worksheet where it copied the data from.

My question is, how can i just tinker with this so that it does a
paste special 'values only' rather than a full paste.

Any help would be greatly appreciated.
Scott
------------------------------------------------------------
Sub scalp_line4_button_click()
Range("b6:l6").Copy Destination:= _
Sheets("CLOSED").Cells(Rows.Count, 1).End(xlUp) _
.Offset(1, 0)
Range("b6:d6").ClearContents
Range("f6:k6").ClearContents

End Sub '
--------------------------------------------------------------

Bob Phillips[_6_]

macro adjustment help
 
Scott,

Try this

Sub scalp_line4_button_click()
Range("b6:l6").Copy
Sheets("CLOSED").Cells(Rows.Count, 1).End(xlUp) _
.Offset(1, 0).PasteSpecial Paste:=xlPasteValues
Range("b6:d6").ClearContents
Range("f6:k6").ClearContents

End Sub

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"scott23" wrote in message
m...
Hi,
I have the following macro that copies data from one line of a
worksheet and the pastes it to another worksheet immediately after the
last line that contains data. It then erases only certin cells of the
1st worksheet where it copied the data from.

My question is, how can i just tinker with this so that it does a
paste special 'values only' rather than a full paste.

Any help would be greatly appreciated.
Scott
------------------------------------------------------------
Sub scalp_line4_button_click()
Range("b6:l6").Copy Destination:= _
Sheets("CLOSED").Cells(Rows.Count, 1).End(xlUp) _
.Offset(1, 0)
Range("b6:d6").ClearContents
Range("f6:k6").ClearContents

End Sub '
--------------------------------------------------------------




Don Guillett[_4_]

macro adjustment help
 
maybe

Sub scalp_line4_button_click()
Range("B6:B16").Copy
Sheets("CLOSED").Range("a65536").End(xlUp) _
..Offset(1).PasteSpecial Paste:=xlValues
Range("b6:d6,f6:k6").ClearContents
End Sub

--
Don Guillett
SalesAid Software

"scott23" wrote in message
m...
Hi,
I have the following macro that copies data from one line of a
worksheet and the pastes it to another worksheet immediately after the
last line that contains data. It then erases only certin cells of the
1st worksheet where it copied the data from.

My question is, how can i just tinker with this so that it does a
paste special 'values only' rather than a full paste.

Any help would be greatly appreciated.
Scott
------------------------------------------------------------
Sub scalp_line4_button_click()
Range("b6:l6").Copy Destination:= _
Sheets("CLOSED").Cells(Rows.Count, 1).End(xlUp) _
.Offset(1, 0)
Range("b6:d6").ClearContents
Range("f6:k6").ClearContents

End Sub '
--------------------------------------------------------------





All times are GMT +1. The time now is 06:24 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com