Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Copy & Paste+Offset

Want to copy data in Sheet1 a1:j1 Copy and paste Values
to Sheet 2 A1:j1


When Macro is rerun 1 want to copy the data Sheet1:a1:j1
to Sheet 2!a2:j2(Values only)

Each time I want to add the data from line 1 sheet 1 to the next
unoccupied line in Sheet 2

Ron

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Copy & Paste+Offset

Hi Ronald,

Try:

Sub Tester()
Dim Rng As Range
Application.ScreenUpdating = False
With Sheets("Sheet2")
If Not IsEmpty(.Range("A1")) Then
Set Rng = .Cells(Rows.Count, 1).End(xlUp)(2)
Else
Set Rng = .Range("A1")
End If
End With

Sheets("Sheet1").Range("A1:J1").Copy
Rng.PasteSpecial Paste:=xlValues

With Application
.CutCopyMode = False
.ScreenUpdating = False
End With
End Sub


---
Regards,
Norman



"Ronald Cayne" wrote in message
...
Want to copy data in Sheet1 a1:j1 Copy and paste Values
to Sheet 2 A1:j1


When Macro is rerun 1 want to copy the data Sheet1:a1:j1
to Sheet 2!a2:j2(Values only)

Each time I want to add the data from line 1 sheet 1 to the next
unoccupied line in Sheet 2

Ron



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Copy & Paste+Offset

Hi Ronald,

The ante-penultimate line

.ScreenUpdating = False


should read

.ScreenUpdating = True

---
Regards,
Norman



"Norman Jones" wrote in message
...
Hi Ronald,

Try:

Sub Tester()
Dim Rng As Range
Application.ScreenUpdating = False
With Sheets("Sheet2")
If Not IsEmpty(.Range("A1")) Then
Set Rng = .Cells(Rows.Count, 1).End(xlUp)(2)
Else
Set Rng = .Range("A1")
End If
End With

Sheets("Sheet1").Range("A1:J1").Copy
Rng.PasteSpecial Paste:=xlValues

With Application
.CutCopyMode = False
.ScreenUpdating = False
End With
End Sub


---
Regards,
Norman



"Ronald Cayne" wrote in message
...
Want to copy data in Sheet1 a1:j1 Copy and paste Values
to Sheet 2 A1:j1


When Macro is rerun 1 want to copy the data Sheet1:a1:j1
to Sheet 2!a2:j2(Values only)

Each time I want to add the data from line 1 sheet 1 to the next
unoccupied line in Sheet 2

Ron





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
Can't Copy and Paste or Paste Special between Excel Workbooks wllee Excel Discussion (Misc queries) 5 April 29th 23 03:43 AM
copy offset to cell Kev Excel Discussion (Misc queries) 6 December 31st 06 04:02 AM
Why Copy/Paste fails using Offset & Resize of myRange? [email protected] Excel Discussion (Misc queries) 3 November 21st 06 02:06 AM
Excel cut/Paste Problem: Year changes after data is copy and paste Asif Excel Discussion (Misc queries) 2 December 9th 05 05:16 PM
copy and paste with offset kevcar40 Excel Discussion (Misc queries) 3 October 10th 05 03:20 PM


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

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

About Us

"It's about Microsoft Excel"