PC Review


Reply
Thread Tools Rate Thread

Copy from 1 worksheet to multipule worksheets based upon worksheetname

 
 
bbhighfi@hotmail.com
Guest
Posts: n/a
 
      2nd Jan 2008
HELP!

Goal: seeking to have a row of data in "sheet1" which has a unique
indentifier in cell D6 copy and pasted to a worksheeting within the
same workbook that matches the uniquie indentifier in Cell D6. I would
like this to loop through to the end of the 30 or so records.

Current Code: I have this macro repeating thirty times, but does not
allow for any new additions to the "sheet1" data rows (ie, if I delete
one item and replace it with a new identifier)

Sheets("sheet1").Activate
Range("G7:K7").Select
Selection.Copy
Sheets("DAVE").Select
Range("B7").Select
ActiveSheet.Paste

My Flustration: tying the identifer, which is not copied to the
individual worksheet to the worksheet which matches the identifer and
having the process loop though all records, copy the data from g:k and
then deposit that data into the correct sheet (in the case above, its
"DAVE").

hope this makes sense, Happy New year to all. Thanks.
 
Reply With Quote
 
 
 
 
Ron de Bruin
Guest
Posts: n/a
 
      2nd Jan 2008
See reply in your other thread

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


<(E-Mail Removed)> wrote in message news:f2cd6830-3b36-4982-a11d-(E-Mail Removed)...
> HELP!
>
> Goal: seeking to have a row of data in "sheet1" which has a unique
> indentifier in cell D6 copy and pasted to a worksheeting within the
> same workbook that matches the uniquie indentifier in Cell D6. I would
> like this to loop through to the end of the 30 or so records.
>
> Current Code: I have this macro repeating thirty times, but does not
> allow for any new additions to the "sheet1" data rows (ie, if I delete
> one item and replace it with a new identifier)
>
> Sheets("sheet1").Activate
> Range("G7:K7").Select
> Selection.Copy
> Sheets("DAVE").Select
> Range("B7").Select
> ActiveSheet.Paste
>
> My Flustration: tying the identifer, which is not copied to the
> individual worksheet to the worksheet which matches the identifer and
> having the process loop though all records, copy the data from g:k and
> then deposit that data into the correct sheet (in the case above, its
> "DAVE").
>
> hope this makes sense, Happy New year to all. Thanks.

 
Reply With Quote
 
Ken
Guest
Posts: n/a
 
      2nd Jan 2008
There is some additional information that is needed for an efficient
and robust solution: but, assuming that your "identifiers" in column D
are in rows 1 through 6 and you always want the data from sheet1 to go
to row 7 of the identified sheet, the following should get you
started:

Sub test()

For i = 1 To 6
For j = 8 To 11
Worksheets(Cells(i, 4).Value).Cells(7, j).Value = Cells(i,
j).Value
Next j
Next i

End Sub

If the sheet does not exist you will get an error.

Good luck.

Ken
Norfolk, Va.


On Jan 2, 2:54*pm, bbhig...@hotmail.com wrote:
> HELP!
>
> Goal: seeking to have *a row of data in "sheet1" which has a unique
> indentifier in cell D6 copy and pasted to a worksheeting within the
> same workbook that matches the uniquie indentifier in Cell D6. I would
> like this to loop through to the end of the 30 or so records.
>
> Current Code: *I have this macro repeating thirty times, but does not
> allow for any new additions to the "sheet1" data rows (ie, if I delete
> one item and replace it with a new identifier)
>
> Sheets("sheet1").Activate
> * * Range("G7:K7").Select
> * * Selection.Copy
> * * Sheets("DAVE").Select
> * * Range("B7").Select
> * * ActiveSheet.Paste
>
> My Flustration: *tying the identifer, which is not copied to the
> individual worksheet to the worksheet which matches the identifer and
> having the process loop though all records, copy the data from g:k and
> then deposit that data into the correct sheet (in the case above, its
> "DAVE").
>
> hope this makes sense, Happy New year to all. Thanks.


 
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
copy partial worksheet to a different worksheet based on date?? Kevin J Prince Microsoft Excel Discussion 4 8th Sep 2007 07:01 AM
copy graph from a Worksheet based on a field in another Worksheet =?Utf-8?B?SmltIEsuIC0gU0dC?= Microsoft Excel Worksheet Functions 2 6th Jul 2007 06:08 PM
Copy worksheets to new worksheet and add a worksheet name column to new sheet. Lib Microsoft Excel Programming 1 22nd Feb 2007 04:30 PM
Create a master worksheet based on 2 different worksheets =?Utf-8?B?S3Jpc3RpbmE=?= Microsoft Excel Worksheet Functions 0 23rd Aug 2005 06:41 PM
Multipule Worksheets Andrew Microsoft Excel Misc 0 17th Sep 2003 02:23 PM


Features
 

Advertising
 

Newsgroups
 


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