Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Copy variable rows of data to new sheet

I have to populate two tables in an Access database using the data contained
in several workbooks. The workbooks contain a row of data that will populate
one of the tables (Customers) and one or more adjacent rows that contain the
customer number and at least one account number that will poplulate the
AcctNumb table. Here's an example:

CustName CustNumb Document AccountNumb

Abigail L Smith 990682764 Non-Doc
990682764 100384733
990682764 173550511

The first row will populate the Customer table. The second and third rows
(in this example) will populate the AccountNumb table. The customer numbers
will be the keys in each table.

After I have copied rows two and three to a new sheet I want to delete those
rows in the original sheet . The number of rows of data I will need to copy
for each customer could vary from 1 to 10 or possibly more. Therefore, I need
to be able to vary the number.

I am going to have 8 workbooks that will require a similar operation
utilizing the copy-paste-delete row routine so would like to be able to
modify the code to adapt to the various sheets.

Your help is most appreciated!

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
copy rows from one Data sheet to another sheet based on cell conte John McKeon Excel Discussion (Misc queries) 2 May 15th 10 06:49 AM
copy data from sheet2 to sheet1 when sheet2 has variable # of rows Anne Excel Discussion (Misc queries) 6 February 27th 09 09:48 PM
copy down with variable number of rows mohavv Excel Discussion (Misc queries) 5 November 15th 07 04:18 PM
Referencing cells and copy rows of data back to summary sheet MaggieR Excel Discussion (Misc queries) 5 October 16th 07 11:41 PM
Loop/copy rows variable times to new sheet Patti[_6_] Excel Programming 7 June 30th 05 06:36 PM


All times are GMT +1. The time now is 04:43 AM.

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"