PC Review


Reply
Thread Tools Rate Thread

Copy certain cells to a "backup" sheet using VB

 
 
Chris
Guest
Posts: n/a
 
      9th May 2009
Hey everyone. So I have an Excell workbook where the user keeps track of
his/her sales data, basically to have record of which accounts were accessed,
how many sales were made, etc.

Now before you ask, the company doesn't want Access :/

What I need to do is copy the information they put in (from A2:L2, all the
way to A21:L21, for each sheet (there are 14 sheets), and put it on a final
sheet which would be used for exporting purposes. Now we also need the
information to NOT copy if it's a blank row, and update on-the-fly. Is there
a method of doing this in Excell 2003/2007?

Thanks in advance, for any help.

Chris
 
Reply With Quote
 
 
 
 
Don Guillett
Guest
Posts: n/a
 
      9th May 2009
Something like (un tested)

sub copytomaster()
for each ws in worksheets
if ws.name <>"Master" then
dlr=sheets("Master").cells(rows.count,"a").end(xlup).row+1
ws.range("a2:l21").copy sheets("Master").cells(dlr,"a")
next ws
end sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"Chris" <(E-Mail Removed)> wrote in message
news:9693987E-90C9-4B28-97D6-(E-Mail Removed)...
> Hey everyone. So I have an Excell workbook where the user keeps track of
> his/her sales data, basically to have record of which accounts were
> accessed,
> how many sales were made, etc.
>
> Now before you ask, the company doesn't want Access :/
>
> What I need to do is copy the information they put in (from A2:L2, all the
> way to A21:L21, for each sheet (there are 14 sheets), and put it on a
> final
> sheet which would be used for exporting purposes. Now we also need the
> information to NOT copy if it's a blank row, and update on-the-fly. Is
> there
> a method of doing this in Excell 2003/2007?
>
> Thanks in advance, for any help.
>
> Chris


 
Reply With Quote
 
Chris
Guest
Posts: n/a
 
      10th May 2009
Thanks, Don. There's a bit more to this that I forgot to include.

The first page is a summary of all 14 days' worth of information, then
there's a script to change the names of each worksheet to the correct date
(so right now, it would go from 5-9, 5-10, all the way to 5-22). Then
finally would be the backup sheet. Also, would what you've posted below
actually check (and skip) the empty lines?

Thanks again,

Chris

"Don Guillett" wrote:

> Something like (un tested)
>
> sub copytomaster()
> for each ws in worksheets
> if ws.name <>"Master" then
> dlr=sheets("Master").cells(rows.count,"a").end(xlup).row+1
> ws.range("a2:l21").copy sheets("Master").cells(dlr,"a")
> next ws
> end sub
>
> --
> Don Guillett
> Microsoft MVP Excel
> SalesAid Software
> (E-Mail Removed)
> "Chris" <(E-Mail Removed)> wrote in message
> news:9693987E-90C9-4B28-97D6-(E-Mail Removed)...
> > Hey everyone. So I have an Excell workbook where the user keeps track of
> > his/her sales data, basically to have record of which accounts were
> > accessed,
> > how many sales were made, etc.
> >
> > Now before you ask, the company doesn't want Access :/
> >
> > What I need to do is copy the information they put in (from A2:L2, all the
> > way to A21:L21, for each sheet (there are 14 sheets), and put it on a
> > final
> > sheet which would be used for exporting purposes. Now we also need the
> > information to NOT copy if it's a blank row, and update on-the-fly. Is
> > there
> > a method of doing this in Excell 2003/2007?
> >
> > Thanks in advance, for any help.
> >
> > Chris

>
>

 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      10th May 2009
Easier if you just send your file to my address below along with a clear
explanation, copy of this msg and before/after examples.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"Chris" <(E-Mail Removed)> wrote in message
news:568E5EDE-A0DA-49E5-A513-(E-Mail Removed)...
> Thanks, Don. There's a bit more to this that I forgot to include.
>
> The first page is a summary of all 14 days' worth of information, then
> there's a script to change the names of each worksheet to the correct date
> (so right now, it would go from 5-9, 5-10, all the way to 5-22). Then
> finally would be the backup sheet. Also, would what you've posted below
> actually check (and skip) the empty lines?
>
> Thanks again,
>
> Chris
>
> "Don Guillett" wrote:
>
>> Something like (un tested)
>>
>> sub copytomaster()
>> for each ws in worksheets
>> if ws.name <>"Master" then
>> dlr=sheets("Master").cells(rows.count,"a").end(xlup).row+1
>> ws.range("a2:l21").copy sheets("Master").cells(dlr,"a")
>> next ws
>> end sub
>>
>> --
>> Don Guillett
>> Microsoft MVP Excel
>> SalesAid Software
>> (E-Mail Removed)
>> "Chris" <(E-Mail Removed)> wrote in message
>> news:9693987E-90C9-4B28-97D6-(E-Mail Removed)...
>> > Hey everyone. So I have an Excell workbook where the user keeps track
>> > of
>> > his/her sales data, basically to have record of which accounts were
>> > accessed,
>> > how many sales were made, etc.
>> >
>> > Now before you ask, the company doesn't want Access :/
>> >
>> > What I need to do is copy the information they put in (from A2:L2, all
>> > the
>> > way to A21:L21, for each sheet (there are 14 sheets), and put it on a
>> > final
>> > sheet which would be used for exporting purposes. Now we also need the
>> > information to NOT copy if it's a blank row, and update on-the-fly. Is
>> > there
>> > a method of doing this in Excell 2003/2007?
>> >
>> > Thanks in advance, for any help.
>> >
>> > Chris

>>
>>


 
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
Whats wrong with this? MyWBAccRep.Sheets("Volumes").Cells.Find("latest").Copy.Offset(0, Simon Microsoft Excel Programming 2 11th Aug 2008 01:29 PM
Excel "Move or Copy" and "Delete" sheet functions dsiama Microsoft Excel Worksheet Functions 1 28th Dec 2007 01:57 PM
find "Cancellation" in column "A" and copy all data from Columns B-F onto another Sheet bjohnson Microsoft Excel Programming 1 20th Sep 2007 04:02 PM
Auto "copy and paste" individual cells from various sheets into one sheet ?? dstdst123@excite.com Microsoft Excel Misc 2 1st Mar 2006 03:19 AM
Can you "duplicate" "copy" listboxes and code to multiple cells? HotRod Microsoft Excel Programming 1 1st Sep 2004 05:03 PM


Features
 

Advertising
 

Newsgroups
 


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