PC Review


Reply
Thread Tools Rate Thread

Copy information from all sheets and store on final sheet.

 
 
=?Utf-8?B?TWFobmlhbg==?=
Guest
Posts: n/a
 
      4th May 2007
I have gotten so much help from this site, and I thank all those you have
assisted me with my project. Anyway, I am down to the final stages of the
project and I am stuck with one last report to generate.

I have a workbook with a dynamic number of sheets, each sheet individually
named for an employee and holding there performance stats; these sheets are
generated and named from a different module.

On each employee named sheet there is a range of cells (C2:M2) I need to
copy and paste to an admin sheet. Below I have shown an example of how I need
the output to look.

Stephen King 296.00 6:59:31 55:27:42 29:49:01 31.00 119:27:30 0:03:19 194.00
30.99
(Sheet name) ( Stats copied from range (C2:M2) on each
sheet )

Now, if the sheets were static, each keeping the same underlying sheet name
(sheet1, sheet2, sheet3, ect) it would not be an issue, but since each time
the workbook is opened and used all the sheets are deleted and recreated,
this information is also dynamic.

I need to pull this information from all but two sheets in the workbook;
those sheets are named ‘Admin Sheet’ and ‘Raw Data’

If anyone can assist, I would greatly appreciate it.

Thank you in advance.

Mahnian

 
Reply With Quote
 
 
 
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      4th May 2007
for each sh in worksheets
if lcase(sh.name) <> "admin sheet" and _
lcase(sh.name) <> "raw data" then


end if
Next

--
Regards,
Tom Ogilvy


"Mahnian" wrote:

> I have gotten so much help from this site, and I thank all those you have
> assisted me with my project. Anyway, I am down to the final stages of the
> project and I am stuck with one last report to generate.
>
> I have a workbook with a dynamic number of sheets, each sheet individually
> named for an employee and holding there performance stats; these sheets are
> generated and named from a different module.
>
> On each employee named sheet there is a range of cells (C2:M2) I need to
> copy and paste to an admin sheet. Below I have shown an example of how I need
> the output to look.
>
> Stephen King 296.00 6:59:31 55:27:42 29:49:01 31.00 119:27:30 0:03:19 194.00
> 30.99
> (Sheet name) ( Stats copied from range (C2:M2) on each
> sheet )
>
> Now, if the sheets were static, each keeping the same underlying sheet name
> (sheet1, sheet2, sheet3, ect) it would not be an issue, but since each time
> the workbook is opened and used all the sheets are deleted and recreated,
> this information is also dynamic.
>
> I need to pull this information from all but two sheets in the workbook;
> those sheets are named ‘Admin Sheet’ and ‘Raw Data’
>
> If anyone can assist, I would greatly appreciate it.
>
> Thank you in advance.
>
> Mahnian
>

 
Reply With Quote
 
=?Utf-8?B?TWFobmlhbg==?=
Guest
Posts: n/a
 
      4th May 2007
That worked wonderfully, now if anyone knows how to do the second part..
Where I pull that single range of data from every otehr sheet and add them in
a list to the admin sheet..

rep1
rep2
rep3

and so on.

"Tom Ogilvy" wrote:

> for each sh in worksheets
> if lcase(sh.name) <> "admin sheet" and _
> lcase(sh.name) <> "raw data" then
>
>
> end if
> Next
>
> --
> Regards,
> Tom Ogilvy
>
>
> "Mahnian" wrote:
>
> > I have gotten so much help from this site, and I thank all those you have
> > assisted me with my project. Anyway, I am down to the final stages of the
> > project and I am stuck with one last report to generate.
> >
> > I have a workbook with a dynamic number of sheets, each sheet individually
> > named for an employee and holding there performance stats; these sheets are
> > generated and named from a different module.
> >
> > On each employee named sheet there is a range of cells (C2:M2) I need to
> > copy and paste to an admin sheet. Below I have shown an example of how I need
> > the output to look.
> >
> > Stephen King 296.00 6:59:31 55:27:42 29:49:01 31.00 119:27:30 0:03:19 194.00
> > 30.99
> > (Sheet name) ( Stats copied from range (C2:M2) on each
> > sheet )
> >
> > Now, if the sheets were static, each keeping the same underlying sheet name
> > (sheet1, sheet2, sheet3, ect) it would not be an issue, but since each time
> > the workbook is opened and used all the sheets are deleted and recreated,
> > this information is also dynamic.
> >
> > I need to pull this information from all but two sheets in the workbook;
> > those sheets are named ‘Admin Sheet’ and ‘Raw Data’
> >
> > If anyone can assist, I would greatly appreciate it.
> >
> > Thank you in advance.
> >
> > Mahnian
> >

 
Reply With Quote
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      4th May 2007
Sub copyData()
Dim sh1 as worksheet, sh as worksheet
Dim rng as Range, rw as Long
set sh1 = Worksheets("Admin Sheet")
rw = 3
for each sh in worksheets
if lcase(sh.name) <> "admin sheet" and _
lcase(sh.name) <> "raw data" then
set rng = sh.Range("C2:M2")
sh1.Cells(rw,1) = sh.name
rng.copy sh.Cells(rw,3)
rw = rw + 1
end if
Next
End Sub

--
Regards,
Tom Ogilvy


"Mahnian" wrote:

> That worked wonderfully, now if anyone knows how to do the second part..
> Where I pull that single range of data from every otehr sheet and add them in
> a list to the admin sheet..
>
> rep1
> rep2
> rep3
>
> and so on.
>
> "Tom Ogilvy" wrote:
>
> > for each sh in worksheets
> > if lcase(sh.name) <> "admin sheet" and _
> > lcase(sh.name) <> "raw data" then
> >
> >
> > end if
> > Next
> >
> > --
> > Regards,
> > Tom Ogilvy
> >
> >
> > "Mahnian" wrote:
> >
> > > I have gotten so much help from this site, and I thank all those you have
> > > assisted me with my project. Anyway, I am down to the final stages of the
> > > project and I am stuck with one last report to generate.
> > >
> > > I have a workbook with a dynamic number of sheets, each sheet individually
> > > named for an employee and holding there performance stats; these sheets are
> > > generated and named from a different module.
> > >
> > > On each employee named sheet there is a range of cells (C2:M2) I need to
> > > copy and paste to an admin sheet. Below I have shown an example of how I need
> > > the output to look.
> > >
> > > Stephen King 296.00 6:59:31 55:27:42 29:49:01 31.00 119:27:30 0:03:19 194.00
> > > 30.99
> > > (Sheet name) ( Stats copied from range (C2:M2) on each
> > > sheet )
> > >
> > > Now, if the sheets were static, each keeping the same underlying sheet name
> > > (sheet1, sheet2, sheet3, ect) it would not be an issue, but since each time
> > > the workbook is opened and used all the sheets are deleted and recreated,
> > > this information is also dynamic.
> > >
> > > I need to pull this information from all but two sheets in the workbook;
> > > those sheets are named ‘Admin Sheet’ and ‘Raw Data’
> > >
> > > If anyone can assist, I would greatly appreciate it.
> > >
> > > Thank you in advance.
> > >
> > > Mahnian
> > >

 
Reply With Quote
 
=?Utf-8?B?TWFobmlhbg==?=
Guest
Posts: n/a
 
      4th May 2007
Thank you for this, though it does nto seem to work quite right.

It will copy the names from each sheet as I need it, but it will not copy
the information from the individual sheets.

I have looked over it, with my limited knowledge, and can not see anythign
that is stopping this.

Thank you so much.

"Tom Ogilvy" wrote:

> Sub copyData()
> Dim sh1 as worksheet, sh as worksheet
> Dim rng as Range, rw as Long
> set sh1 = Worksheets("Admin Sheet")
> rw = 3
> for each sh in worksheets
> if lcase(sh.name) <> "admin sheet" and _
> lcase(sh.name) <> "raw data" then
> set rng = sh.Range("C2:M2")
> sh1.Cells(rw,1) = sh.name
> rng.copy sh.Cells(rw,3)
> rw = rw + 1
> end if
> Next
> End Sub
>
> --
> Regards,
> Tom Ogilvy
>
>
> "Mahnian" wrote:
>
> > That worked wonderfully, now if anyone knows how to do the second part..
> > Where I pull that single range of data from every otehr sheet and add them in
> > a list to the admin sheet..
> >
> > rep1
> > rep2
> > rep3
> >
> > and so on.
> >
> > "Tom Ogilvy" wrote:
> >
> > > for each sh in worksheets
> > > if lcase(sh.name) <> "admin sheet" and _
> > > lcase(sh.name) <> "raw data" then
> > >
> > >
> > > end if
> > > Next
> > >
> > > --
> > > Regards,
> > > Tom Ogilvy
> > >
> > >
> > > "Mahnian" wrote:
> > >
> > > > I have gotten so much help from this site, and I thank all those you have
> > > > assisted me with my project. Anyway, I am down to the final stages of the
> > > > project and I am stuck with one last report to generate.
> > > >
> > > > I have a workbook with a dynamic number of sheets, each sheet individually
> > > > named for an employee and holding there performance stats; these sheets are
> > > > generated and named from a different module.
> > > >
> > > > On each employee named sheet there is a range of cells (C2:M2) I need to
> > > > copy and paste to an admin sheet. Below I have shown an example of how I need
> > > > the output to look.
> > > >
> > > > Stephen King 296.00 6:59:31 55:27:42 29:49:01 31.00 119:27:30 0:03:19 194.00
> > > > 30.99
> > > > (Sheet name) ( Stats copied from range (C2:M2) on each
> > > > sheet )
> > > >
> > > > Now, if the sheets were static, each keeping the same underlying sheet name
> > > > (sheet1, sheet2, sheet3, ect) it would not be an issue, but since each time
> > > > the workbook is opened and used all the sheets are deleted and recreated,
> > > > this information is also dynamic.
> > > >
> > > > I need to pull this information from all but two sheets in the workbook;
> > > > those sheets are named ‘Admin Sheet’ and ‘Raw Data’
> > > >
> > > > If anyone can assist, I would greatly appreciate it.
> > > >
> > > > Thank you in advance.
> > > >
> > > > Mahnian
> > > >

 
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
referencing specific data accross many sheets in a final sheet cha Chris Cornell Microsoft Excel Misc 1 1st Nov 2008 02:44 AM
in VBA Sheets("mysheet").Copy Before:=Sheets(1) how do i get a reference to the newly created copy of this sheet? Daniel Microsoft Excel Discussion 1 6th Jul 2005 10:05 PM
in VBA Sheets("mysheet").Copy Before:=Sheets(1) how do i get a reference to the newly created copy of this sheet? Daniel Microsoft Excel Worksheet Functions 1 6th Jul 2005 09:57 PM
Copy information from other sheets to one special sheet. Paul Microsoft Excel Programming 0 25th Sep 2003 11:54 PM
Making subsequent sheets after sheet 1 copy sheet 1 when it is changed Tim Microsoft Excel Worksheet Functions 0 24th Sep 2003 06:25 PM


Features
 

Advertising
 

Newsgroups
 


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