PC Review


Reply
Thread Tools Rate Thread

Copy PIVOT table?

 
 
MikeF
Guest
Posts: n/a
 
      29th Mar 2009

Have a nicely-constructed Pivot Table that runs off Sheet ACC / Range
d7:x2000 every week.

There are numerous weekly files [well, 52 per year!].
The sheet and field names are exactly the same.
.... Just the data is different each week.

Have attempted numerous methods of copying/copy worksheet/and so on into
each week, then using Pivot Table / Options / Change Data Source, but to no
avail.

Any assistance will be sincerely appreciated.
- Mike


 
Reply With Quote
 
 
 
 
Barb Reinhardt
Guest
Posts: n/a
 
      29th Mar 2009
I set up a dynamic range for pivot table sources that expands/contracts as
needed.

Let's say row 1 has a header and the data is in subsequent rows (with no
empty rows).

Define the range this way

=Offset(Sheet1!A1,1,0,counta(Sheet1!A:A)-1,counta(sheet1!1:1))

And set the source to the defined range.

HTH,
Barb Reinhardt

"MikeF" wrote:

>
> Have a nicely-constructed Pivot Table that runs off Sheet ACC / Range
> d7:x2000 every week.
>
> There are numerous weekly files [well, 52 per year!].
> The sheet and field names are exactly the same.
> ... Just the data is different each week.
>
> Have attempted numerous methods of copying/copy worksheet/and so on into
> each week, then using Pivot Table / Options / Change Data Source, but to no
> avail.
>
> Any assistance will be sincerely appreciated.
> - Mike
>
>

 
Reply With Quote
 
MikeF
Guest
Posts: n/a
 
      29th Mar 2009

Barb,
Thanx for the reply.

My pivot table actually starts at d7 [there is some titling/etc from other
parts of the workbook], and ends at column x.
So I modified your formula as follows, but it doesnt' work ...

=OFFSET(acc!$D$7,0,0,COUNTA(acc!$D$7:$D$2000),COUNTA(acc!$4:$24))

*** Tried your solution with everything starting in d1, it does work.

Regards,
-Mike

"Barb Reinhardt" wrote:

> I set up a dynamic range for pivot table sources that expands/contracts as
> needed.
>
> Let's say row 1 has a header and the data is in subsequent rows (with no
> empty rows).
>
> Define the range this way
>
> =Offset(Sheet1!A1,1,0,counta(Sheet1!A:A)-1,counta(sheet1!1:1))
>
> And set the source to the defined range.
>
> HTH,
> Barb Reinhardt
>
> "MikeF" wrote:
>
> >
> > Have a nicely-constructed Pivot Table that runs off Sheet ACC / Range
> > d7:x2000 every week.
> >
> > There are numerous weekly files [well, 52 per year!].
> > The sheet and field names are exactly the same.
> > ... Just the data is different each week.
> >
> > Have attempted numerous methods of copying/copy worksheet/and so on into
> > each week, then using Pivot Table / Options / Change Data Source, but to no
> > avail.
> >
> > Any assistance will be sincerely appreciated.
> > - Mike
> >
> >

 
Reply With Quote
 
Barb Reinhardt
Guest
Posts: n/a
 
      29th Mar 2009
This is what you have:

=OFFSET(acc!$D$7,0,0,COUNTA(acc!$D$7:$D$2000),COUNTA(acc!$4:$24))

I'd tweek a couple of sections.

Change CountA(acc!$D7$2000) to

Counta(Acc!$D:$D) and subtrack the number of rows you don't want to
include. You may need to play with this a bit.

Change this; COUNTA(acc!$4:$24))

to something like
COUNTA(Acc!$7:$7) and subtract the number of columns that may have data you
don't want to include.

It's a bit trial by error. Once you get the handle on Offset, you'll use it
all the time.

HTH,
Barb Reinhardt

"MikeF" wrote:

>
> Barb,
> Thanx for the reply.
>
> My pivot table actually starts at d7 [there is some titling/etc from other
> parts of the workbook], and ends at column x.
> So I modified your formula as follows, but it doesnt' work ...
>
> =OFFSET(acc!$D$7,0,0,COUNTA(acc!$D$7:$D$2000),COUNTA(acc!$4:$24))
>
> *** Tried your solution with everything starting in d1, it does work.
>
> Regards,
> -Mike
>
> "Barb Reinhardt" wrote:
>
> > I set up a dynamic range for pivot table sources that expands/contracts as
> > needed.
> >
> > Let's say row 1 has a header and the data is in subsequent rows (with no
> > empty rows).
> >
> > Define the range this way
> >
> > =Offset(Sheet1!A1,1,0,counta(Sheet1!A:A)-1,counta(sheet1!1:1))
> >
> > And set the source to the defined range.
> >
> > HTH,
> > Barb Reinhardt
> >
> > "MikeF" wrote:
> >
> > >
> > > Have a nicely-constructed Pivot Table that runs off Sheet ACC / Range
> > > d7:x2000 every week.
> > >
> > > There are numerous weekly files [well, 52 per year!].
> > > The sheet and field names are exactly the same.
> > > ... Just the data is different each week.
> > >
> > > Have attempted numerous methods of copying/copy worksheet/and so on into
> > > each week, then using Pivot Table / Options / Change Data Source, but to no
> > > avail.
> > >
> > > Any assistance will be sincerely appreciated.
> > > - Mike
> > >
> > >

 
Reply With Quote
 
MikeF
Guest
Posts: n/a
 
      30th Mar 2009
Barb,

This ended up working ....

=OFFSET(acc!$D$7,0,0,COUNTA(acc!$D$7:$D$2000),COUNTA(acc!$D$7:$X$7))

Thanx again!!
- Mike

"Barb Reinhardt" wrote:

> This is what you have:
>
> =OFFSET(acc!$D$7,0,0,COUNTA(acc!$D$7:$D$2000),COUNTA(acc!$4:$24))
>
> I'd tweek a couple of sections.
>
> Change CountA(acc!$D7$2000) to
>
> Counta(Acc!$D:$D) and subtrack the number of rows you don't want to
> include. You may need to play with this a bit.
>
> Change this; COUNTA(acc!$4:$24))
>
> to something like
> COUNTA(Acc!$7:$7) and subtract the number of columns that may have data you
> don't want to include.
>
> It's a bit trial by error. Once you get the handle on Offset, you'll use it
> all the time.
>
> HTH,
> Barb Reinhardt
>
> "MikeF" wrote:
>
> >
> > Barb,
> > Thanx for the reply.
> >
> > My pivot table actually starts at d7 [there is some titling/etc from other
> > parts of the workbook], and ends at column x.
> > So I modified your formula as follows, but it doesnt' work ...
> >
> > =OFFSET(acc!$D$7,0,0,COUNTA(acc!$D$7:$D$2000),COUNTA(acc!$4:$24))
> >
> > *** Tried your solution with everything starting in d1, it does work.
> >
> > Regards,
> > -Mike
> >
> > "Barb Reinhardt" wrote:
> >
> > > I set up a dynamic range for pivot table sources that expands/contracts as
> > > needed.
> > >
> > > Let's say row 1 has a header and the data is in subsequent rows (with no
> > > empty rows).
> > >
> > > Define the range this way
> > >
> > > =Offset(Sheet1!A1,1,0,counta(Sheet1!A:A)-1,counta(sheet1!1:1))
> > >
> > > And set the source to the defined range.
> > >
> > > HTH,
> > > Barb Reinhardt
> > >
> > > "MikeF" wrote:
> > >
> > > >
> > > > Have a nicely-constructed Pivot Table that runs off Sheet ACC / Range
> > > > d7:x2000 every week.
> > > >
> > > > There are numerous weekly files [well, 52 per year!].
> > > > The sheet and field names are exactly the same.
> > > > ... Just the data is different each week.
> > > >
> > > > Have attempted numerous methods of copying/copy worksheet/and so on into
> > > > each week, then using Pivot Table / Options / Change Data Source, but to no
> > > > avail.
> > > >
> > > > Any assistance will be sincerely appreciated.
> > > > - Mike
> > > >
> > > >

 
Reply With Quote
 
Barb Reinhardt
Guest
Posts: n/a
 
      30th Mar 2009
The only issue I'd have with your formula is what happens if the range ever
expands to the right or is longer than 2000? It sometimes happens and you
won't catch it with your pivot source.

"MikeF" wrote:

> Barb,
>
> This ended up working ....
>
> =OFFSET(acc!$D$7,0,0,COUNTA(acc!$D$7:$D$2000),COUNTA(acc!$D$7:$X$7))
>
> Thanx again!!
> - Mike
>
> "Barb Reinhardt" wrote:
>
> > This is what you have:
> >
> > =OFFSET(acc!$D$7,0,0,COUNTA(acc!$D$7:$D$2000),COUNTA(acc!$4:$24))
> >
> > I'd tweek a couple of sections.
> >
> > Change CountA(acc!$D7$2000) to
> >
> > Counta(Acc!$D:$D) and subtrack the number of rows you don't want to
> > include. You may need to play with this a bit.
> >
> > Change this; COUNTA(acc!$4:$24))
> >
> > to something like
> > COUNTA(Acc!$7:$7) and subtract the number of columns that may have data you
> > don't want to include.
> >
> > It's a bit trial by error. Once you get the handle on Offset, you'll use it
> > all the time.
> >
> > HTH,
> > Barb Reinhardt
> >
> > "MikeF" wrote:
> >
> > >
> > > Barb,
> > > Thanx for the reply.
> > >
> > > My pivot table actually starts at d7 [there is some titling/etc from other
> > > parts of the workbook], and ends at column x.
> > > So I modified your formula as follows, but it doesnt' work ...
> > >
> > > =OFFSET(acc!$D$7,0,0,COUNTA(acc!$D$7:$D$2000),COUNTA(acc!$4:$24))
> > >
> > > *** Tried your solution with everything starting in d1, it does work.
> > >
> > > Regards,
> > > -Mike
> > >
> > > "Barb Reinhardt" wrote:
> > >
> > > > I set up a dynamic range for pivot table sources that expands/contracts as
> > > > needed.
> > > >
> > > > Let's say row 1 has a header and the data is in subsequent rows (with no
> > > > empty rows).
> > > >
> > > > Define the range this way
> > > >
> > > > =Offset(Sheet1!A1,1,0,counta(Sheet1!A:A)-1,counta(sheet1!1:1))
> > > >
> > > > And set the source to the defined range.
> > > >
> > > > HTH,
> > > > Barb Reinhardt
> > > >
> > > > "MikeF" wrote:
> > > >
> > > > >
> > > > > Have a nicely-constructed Pivot Table that runs off Sheet ACC / Range
> > > > > d7:x2000 every week.
> > > > >
> > > > > There are numerous weekly files [well, 52 per year!].
> > > > > The sheet and field names are exactly the same.
> > > > > ... Just the data is different each week.
> > > > >
> > > > > Have attempted numerous methods of copying/copy worksheet/and so on into
> > > > > each week, then using Pivot Table / Options / Change Data Source, but to no
> > > > > avail.
> > > > >
> > > > > Any assistance will be sincerely appreciated.
> > > > > - Mike
> > > > >
> > > > >

 
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
from pivot table to vb array copy to new table greegan Microsoft Excel Programming 3 2nd Aug 2010 10:42 PM
Copy number to pivot table Miguel Microsoft Excel Programming 0 1st Oct 2009 02:58 PM
Can you copy a pivot table report? =?Utf-8?B?anRyaWdnczE5NDE=?= Microsoft Excel Misc 4 17th Apr 2007 09:14 AM
Is there a way to copy a pivot table using a different data set? =?Utf-8?B?VVBl?= Microsoft Excel Misc 2 21st Apr 2006 04:52 PM
copy/paste pivot table =?Utf-8?B?VG9kZCBMLg==?= Microsoft Excel Worksheet Functions 0 30th Dec 2004 04:11 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:16 AM.