PC Review


Reply
Thread Tools Rate Thread

Copy to Worksheet question

 
 
Joanne
Guest
Posts: n/a
 
      6th Aug 2007
I have a worksheet on my master workbook.
I need to make a copy of one of it's worksheets to a child workbook.
This I know how to do alright.
My problem is that when I paste the ws from the parent wb to the child
wb, I am pasting the info up against a 'last column' on the child - and
if there has been row added or a row deleted from the parent wb, when I
paste to the child wb the last column becomes out of synch with the rows
because it doesn't reflect the change from the parent.
In other words, I paste 45 rows and 10 columns from parent to child, but
child has this 'constant' last column that has 46 rows in it. Now when I
paste my parent 45 rows, somewhere on child there is an extra row in the
last column because of a change on the parent wb.
Row A on both wbs is 'item' and they are unique to each row but
identical on each worksheet. I was thinking that perhaps I should loop
thru col A on both wbs to see if they '=' each other. If they do, great,
paste and go to the next one. But if they don't, I could insert a row
and paste - but that will only work if it is an additional row to the
ws. If it is a deleted row that caused the discrepancy in rows between
the wbs, I have no clue what to do or how to detect that's what the
change is.
Can anyone give me a nudge to get me started on solving this problem?
I sure do appreciate it.
TIA
Joanne
 
Reply With Quote
 
 
 
 
Dallman Ross
Guest
Posts: n/a
 
      6th Aug 2007
In <(E-Mail Removed)>, Joanne
<(E-Mail Removed)> spake thusly:

> My problem is that when I paste the ws from the parent wb to
> the child wb, I am pasting the info up against a 'last column'
> on the child - and if there has been row added or a row deleted
> from the parent wb, when I paste to the child wb the last column
> becomes out of synch with the rows because it doesn't reflect
> the change from the parent.


Maybe Ron de Bruin's well-done sample set for pasting and merging
worksheets and workbooks will be the ticket for you.

http://www.rondebruin.nl/tips.htm

See the Copy/Paste/Merge examples.

--
dman
 
Reply With Quote
 
Joanne
Guest
Posts: n/a
 
      6th Aug 2007
I read thru Ron de Bruin's work, and I agree, there is a load of
information there. Actually while working on this project, I have read
so much code in these forums and in the links provided in many of the
answers in these forums that I begin to think in code, like reading
Shakespeare a lot and you begin to talk like him!! Seriously, it sure
does help you to learn.

I didn't find anything in his code samples that would address the
problem of how to reflect possible added/deleted rows on the parent ws
when copying to the child ws with a 'constant' last row.

Do you or anyone else have any other ideas? Maybe I am approaching the
project from the wrong direction entirely and should try to come up with
a whole different angle to getting the parent ws into the child ws while
keeping the last 'total formula' column in synch. I'm sure I have no
bright ideas, but I'm 100% open to suggestions or other possible
pointers for finding the answer.
Thanks for your interest in my little problem.
Joanne
> In <(E-Mail Removed)>, Joanne
> <(E-Mail Removed)> spake thusly:
>
> > My problem is that when I paste the ws from the parent wb to
> > the child wb, I am pasting the info up against a 'last column'
> > on the child - and if there has been row added or a row deleted
> > from the parent wb, when I paste to the child wb the last column
> > becomes out of synch with the rows because it doesn't reflect
> > the change from the parent.

>
> Maybe Ron de Bruin's well-done sample set for pasting and merging
> worksheets and workbooks will be the ticket for you.
>
> http://www.rondebruin.nl/tips.htm
>
> See the Copy/Paste/Merge examples.
>
>


 
Reply With Quote
 
Dallman Ross
Guest
Posts: n/a
 
      6th Aug 2007
In <(E-Mail Removed)>, Joanne
<(E-Mail Removed)> spake thusly:

> I didn't find anything in his code samples that would address
> the problem of how to reflect possible added/deleted rows on the
> parent ws when copying to the child ws with a 'constant' last
> row.


Maybe just have a private function that re-counts your data rows
each time before the copy of the ws.

-dman-

=================================================
In <(E-Mail Removed)>, Joanne
<(E-Mail Removed)> spake thusly:

> I read thru Ron de Bruin's work, and I agree, there is a load
> of information there. Actually while working on this project, I
> have read so much code in these forums and in the links provided
> in many of the answers in these forums that I begin to think in
> code, like reading Shakespeare a lot and you begin to talk like
> him!! Seriously, it sure does help you to learn.
>
> I didn't find anything in his code samples that would address
> the problem of how to reflect possible added/deleted rows on the
> parent ws when copying to the child ws with a 'constant' last
> row.
>
> Do you or anyone else have any other ideas? Maybe I am
> approaching the project from the wrong direction entirely and
> should try to come up with a whole different angle to getting
> the parent ws into the child ws while keeping the last 'total
> formula' column in synch. I'm sure I have no bright ideas, but
> I'm 100% open to suggestions or other possible pointers for
> finding the answer. Thanks for your interest in my little
> problem. Joanne
>
> [Dallman Ross wrote:]
> > In <(E-Mail Removed)>, Joanne
> > <(E-Mail Removed)> spake thusly:
> >
> > > My problem is that when I paste the ws from the parent wb
> > > to the child wb, I am pasting the info up against a 'last
> > > column' on the child - and if there has been row added or a
> > > row deleted from the parent wb, when I paste to the child wb
> > > the last column becomes out of synch with the rows because it
> > > doesn't reflect the change from the parent.

> >
> > Maybe Ron de Bruin's well-done sample set for pasting and
> > merging worksheets and workbooks will be the ticket for you.
> >
> > http://www.rondebruin.nl/tips.htm
> >
> > See the Copy/Paste/Merge examples.

 
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
multiple worksheet copy and paste formatting question hamroll Microsoft Excel Programming 1 12th Mar 2008 09:25 AM
Copy worksheet to new workbook question =?Utf-8?B?Q2h1Y2sgTQ==?= Microsoft Excel Programming 4 25th Oct 2007 05:05 PM
Copy worksheet question Greegan Microsoft Excel Worksheet Functions 4 1st Aug 2005 06:43 AM
copy range on every worksheet (diff names) to a master worksheet (to be created) Bernie Microsoft Excel Programming 2 22nd Sep 2004 03:30 PM
Copy Worksheet Question Rich9016 Microsoft Excel Misc 1 27th May 2004 07:05 AM


Features
 

Advertising
 

Newsgroups
 


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