PC Review


Reply
Thread Tools Rate Thread

Copy used range

 
 
=?Utf-8?B?YmlsbGlucg==?=
Guest
Posts: n/a
 
      27th Feb 2007
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 With Quote
 
 
 
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      27th Feb 2007
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 With Quote
 
=?Utf-8?B?YmlsbGlucg==?=
Guest
Posts: n/a
 
      27th Feb 2007
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 With Quote
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      27th Feb 2007
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 With Quote
 
=?Utf-8?B?YmlsbGlucg==?=
Guest
Posts: n/a
 
      28th Feb 2007
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 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
Copy Range and Assign a Defined Name to the Pasted Range sgltaylor Microsoft Excel Programming 3 5th Dec 2009 12:47 PM
Copy range from Sheet1 into empty range in Sheet2 Buddy Microsoft Excel Programming 1 19th Aug 2009 12:07 AM
RANGE EXCEL copy cell that meets criteria in a range confused Microsoft Excel Worksheet Functions 3 27th Mar 2008 01:41 PM
How do I edit a selected range then copy the range into an new sheet??? dwyborn Microsoft Excel Programming 2 16th Dec 2005 04:11 PM
Create/copy combo boxes in one range if condition is met in a different range LB Microsoft Excel Programming 4 30th Sep 2005 12:21 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:59 PM.