A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

copy paste via macro



 
 
Thread Tools Display Modes
  #1  
Old February 4th, 2011, 05:04 AM
Azrael Azrael is offline
Member
 
First recorded activity by OfficeFrustration: Mar 2005
Location: New York
Posts: 10
Default copy paste via macro

I need to copy certain data from a page and move it to another form, in the same book. The basics is that data will be entered each day then the user will hit the paste macro and that information will be moved to another page that will store it.
I have this so far, just the rough draft atm:

Sub pasteval()
'
' pasteval Macro
'

'
Range("I13:J13").Select
Selection.Copy
Range("D16").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=True, Transpose:=False
End Sub

But I need the next day's data to be pasted onto D17, and each day after that on subsequent lines. That data will then be used to chart/graph the data for the week/period.
  #2  
Old March 16th, 2011, 11:48 AM
tarquinious tarquinious is offline
Experienced Member
 
First recorded activity by OfficeFrustration: Mar 2011
Posts: 34
Default

Quote:
Originally Posted by Azrael View Post
I need to copy certain data from a page and move it to another form, in the same book. The basics is that data will be entered each day then the user will hit the paste macro and that information will be moved to another page that will store it.
I have this so far, just the rough draft atm:

Sub pasteval()
'
' pasteval Macro
'

'
Range("I13:J13").Select
Selection.Copy
Range("D16").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=True, Transpose:=False
End Sub

But I need the next day's data to be pasted onto D17, and each day after that on subsequent lines. That data will then be used to chart/graph the data for the week/period.
You could put a bit of code after the Range("D16").Select line where it looks for the next blank cell to paste into.

Try:
Do Until ActiveCell = ""
ActiveCell.Offset(1, 0).Activate
Loop
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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


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