Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Copy information from all sheets and store on final sheet.

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Copy information from all sheets and store on final sheet.

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Copy information from all sheets and store on final sheet.

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Copy information from all sheets and store on final sheet.

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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Copy information from all sheets and store on final sheet.

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
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
referencing specific data accross many sheets in a final sheet cha Chris Cornell Excel Discussion (Misc queries) 1 November 1st 08 02:44 AM
store inventory sheet(ex:sports equipment store) vardan Excel Worksheet Functions 1 October 11th 06 12:51 AM
in VBA Sheets("mysheet").Copy Befo=Sheets(1) how do i get a reference to the newly created copy of this sheet? Daniel Excel Worksheet Functions 1 July 6th 05 09:57 PM
Copy information from other sheets to one special sheet. Paul Excel Programming 0 September 25th 03 11:54 PM
Macro to insert new sheets and copy information. Paul Excel Programming 4 September 5th 03 07:50 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"