PC Review


Reply
Thread Tools Rate Thread

Copy and Paste in steps

 
 
haas786@yahoo.com
Guest
Posts: n/a
 
      17th Nov 2006
Hey all,

How would I copy a certain amount of rows (customer data info) from a
workbook to paste into a master database based on a cell which
indicates the number of rows?

For example, I have a worksheet with 15 rows of customer data. I just
want to copy 4 rows - (this is based on a cell in A1 signifying I want
only the first 4 rows copied.) Based on that, I'd run a macro which
would copy only those 4 rows (starting from rows 3 to row 6) and paste
them into a master database. The paste will happen at the next row from
the end of the master database.

Thanks for your help in advance.

 
Reply With Quote
 
 
 
 
Don Guillett
Guest
Posts: n/a
 
      17th Nov 2006
You may like this. Works from the active cell. the ,7 is the number of
columns to the right

Sub copyvarrows()
num = InputBox("Number of rows")
With Sheets("master")
lr = .Cells(.Rows.Count, "a").End(xlUp).Row + 1
ActiveCell.Resize(num, 7).Copy .Rows(lr)
End With
End Sub
--
Don Guillett
SalesAid Software
(E-Mail Removed)
<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hey all,
>
> How would I copy a certain amount of rows (customer data info) from a
> workbook to paste into a master database based on a cell which
> indicates the number of rows?
>
> For example, I have a worksheet with 15 rows of customer data. I just
> want to copy 4 rows - (this is based on a cell in A1 signifying I want
> only the first 4 rows copied.) Based on that, I'd run a macro which
> would copy only those 4 rows (starting from rows 3 to row 6) and paste
> them into a master database. The paste will happen at the next row from
> the end of the master database.
>
> Thanks for your help in advance.
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Steps to fix the screenshot-paste-into-email issue Steve Langille Microsoft Outlook Discussion 1 30th Aug 2010 03:39 PM
Memory jam after too many worksheet copy steps? jayray Microsoft Excel Programming 3 5th Aug 2007 03:37 AM
Copy & Paste Object without using the Excel Copy Paste functions =?Utf-8?B?R2Fueg==?= Microsoft Excel New Users 0 10th Mar 2004 07:06 AM
Copy & Paste Object without using the Excel Copy Paste functions =?Utf-8?B?R2Fueg==?= Microsoft Excel Misc 0 10th Mar 2004 07:06 AM
How can i do those three steps automatically :Filter data, sort the order, copy & paste to another worksheet PROXY Microsoft Excel Discussion 1 9th Sep 2003 02:56 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:09 AM.