Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default Copy used range

I have a workbook containing several sheets; all with varied amounts of data.
What I would like to do is to create a dynamic summary page of all the
sheets in the workbook, where all the cells are live links to their original
locations.

Any ideas?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Copy used range

This should get you started.
sub ABC()
Dim sh as Worksheet, sh1 as Worksheet
Dim rw as Long
rw = 2
set sh1 = worksheets("Summary")
for each sh in worksheets
if sh.Name < sh1.Name then
sh1.Cells(rw,"A").Value = sh.Name
sh1.Cells(rw,"B").Formula = "=" & sh.Range( _
"B9").Address(0,0,xlA1,True)
rw = rw + 1
end if
Next
end Sub

Expand to meet your needs.

--
Regards,
Tom Ogilvy



"billinr" wrote:

I have a workbook containing several sheets; all with varied amounts of data.
What I would like to do is to create a dynamic summary page of all the
sheets in the workbook, where all the cells are live links to their original
locations.

Any ideas?

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default Copy used range

Thanks for the start, Tom.
Please forgive my ignorance, but this doesn't quite provide all the
information. The result I see for cell B9 is good, but how do I change that
to show the entire used range of the sheet? I would need to see all of the
information on all of the sheets in the summary.

Thanks again for your help.

"Tom Ogilvy" wrote:

This should get you started.
sub ABC()
Dim sh as Worksheet, sh1 as Worksheet
Dim rw as Long
rw = 2
set sh1 = worksheets("Summary")
for each sh in worksheets
if sh.Name < sh1.Name then
sh1.Cells(rw,"A").Value = sh.Name
sh1.Cells(rw,"B").Formula = "=" & sh.Range( _
"B9").Address(0,0,xlA1,True)
rw = rw + 1
end if
Next
end Sub

Expand to meet your needs.

--
Regards,
Tom Ogilvy



"billinr" wrote:

I have a workbook containing several sheets; all with varied amounts of data.
What I would like to do is to create a dynamic summary page of all the
sheets in the workbook, where all the cells are live links to their original
locations.

Any ideas?

Thanks

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Copy used range

Sub ABC()
Dim sh As Worksheet, sh1 As Worksheet
Dim rw As Long, rng As Range
rw = 1
Set sh1 = Worksheets("Summary")
sh1.Activate
For Each sh In Worksheets
If sh.Name < sh1.Name Then
Set rng = sh.UsedRange
sh1.Cells(rw, "A").Select
rng.Copy
sh1.Paste link:=True
rw = rw + rng.Rows.Count
End If
Next
End Sub

--
Regards,
Tom Ogilvy


"billinr" wrote:

Thanks for the start, Tom.
Please forgive my ignorance, but this doesn't quite provide all the
information. The result I see for cell B9 is good, but how do I change that
to show the entire used range of the sheet? I would need to see all of the
information on all of the sheets in the summary.

Thanks again for your help.

"Tom Ogilvy" wrote:

This should get you started.
sub ABC()
Dim sh as Worksheet, sh1 as Worksheet
Dim rw as Long
rw = 2
set sh1 = worksheets("Summary")
for each sh in worksheets
if sh.Name < sh1.Name then
sh1.Cells(rw,"A").Value = sh.Name
sh1.Cells(rw,"B").Formula = "=" & sh.Range( _
"B9").Address(0,0,xlA1,True)
rw = rw + 1
end if
Next
end Sub

Expand to meet your needs.

--
Regards,
Tom Ogilvy



"billinr" wrote:

I have a workbook containing several sheets; all with varied amounts of data.
What I would like to do is to create a dynamic summary page of all the
sheets in the workbook, where all the cells are live links to their original
locations.

Any ideas?

Thanks

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default Copy used range

Thanks for your help, Tom.

With a little customization, I am able to get the results I need.

I really appreciate your time.

"Tom Ogilvy" wrote:

Sub ABC()
Dim sh As Worksheet, sh1 As Worksheet
Dim rw As Long, rng As Range
rw = 1
Set sh1 = Worksheets("Summary")
sh1.Activate
For Each sh In Worksheets
If sh.Name < sh1.Name Then
Set rng = sh.UsedRange
sh1.Cells(rw, "A").Select
rng.Copy
sh1.Paste link:=True
rw = rw + rng.Rows.Count
End If
Next
End Sub

--
Regards,
Tom Ogilvy


"billinr" wrote:

Thanks for the start, Tom.
Please forgive my ignorance, but this doesn't quite provide all the
information. The result I see for cell B9 is good, but how do I change that
to show the entire used range of the sheet? I would need to see all of the
information on all of the sheets in the summary.

Thanks again for your help.

"Tom Ogilvy" wrote:

This should get you started.
sub ABC()
Dim sh as Worksheet, sh1 as Worksheet
Dim rw as Long
rw = 2
set sh1 = worksheets("Summary")
for each sh in worksheets
if sh.Name < sh1.Name then
sh1.Cells(rw,"A").Value = sh.Name
sh1.Cells(rw,"B").Formula = "=" & sh.Range( _
"B9").Address(0,0,xlA1,True)
rw = rw + 1
end if
Next
end Sub

Expand to meet your needs.

--
Regards,
Tom Ogilvy



"billinr" wrote:

I have a workbook containing several sheets; all with varied amounts of data.
What I would like to do is to create a dynamic summary page of all the
sheets in the workbook, where all the cells are live links to their original
locations.

Any ideas?

Thanks

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
RANGE EXCEL copy cell that meets criteria in a range confused Excel Worksheet Functions 3 March 27th 08 01:41 PM
copy formulas from a contiguous range to a safe place and copy them back later Lucas Budlong Excel Programming 2 February 22nd 06 08:26 PM
Create/copy combo boxes in one range if condition is met in a different range LB[_4_] Excel Programming 4 September 30th 05 12:21 AM
Code to copy range vs Copy Entire Worksheet - can't figure it out Mike Taylor Excel Programming 1 April 15th 04 08:34 PM
Range COPY function - how to copy VALUES and not formulas James Cooke Excel Programming 1 August 21st 03 07:04 PM


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

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

About Us

"It's about Microsoft Excel"