Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Refreshing a Pivot Table from a dynamic range


Hi there,
I have a pivot table on one worksheet, that is refreshed from a rang
of data on a second worksheet.

the data is refreshed using a query, so can contain different number
of rows.

how can I code it to always refresh using the complete range from th
data worksheet?

can anyone help

--
matp
-----------------------------------------------------------------------
matpj's Profile: http://www.excelforum.com/member.php...fo&userid=2107
View this thread: http://www.excelforum.com/showthread.php?threadid=47787

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Refreshing a Pivot Table from a dynamic range

Is there a defined name for the table, something like External_Range1 or
something close to that.

Use that name as the source for you pivot table.

--
Regards,
Tom Ogilvy


"matpj" wrote in
message ...

Hi there,
I have a pivot table on one worksheet, that is refreshed from a range
of data on a second worksheet.

the data is refreshed using a query, so can contain different numbers
of rows.

how can I code it to always refresh using the complete range from the
data worksheet?

can anyone help?


--
matpj
------------------------------------------------------------------------
matpj's Profile:

http://www.excelforum.com/member.php...o&userid=21076
View this thread: http://www.excelforum.com/showthread...hreadid=477871



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 709
Default Refreshing a Pivot Table from a dynamic range

If you use a named range (Insert -- Name -- Define) and under 'Refers to'
use the offset formula to define a range (eg:
=OFFSET(Data!$A$1,0,0,MAX(2,COUNTA(Data!$A:$A)),11 ) - the max statement
ensures that if your data range returns no data, the pivot table will still
work. Look under Help for details of how to use the offset function properly)

Then use the named range as your pivot table source data.

This assumes that you are using formulas at the side of the query to process
the data further. If all of your data is in the query, then you can use the
name of the query as the data range for the pivot table.

To have everything automatically update when you refresh the query, you need
to disable the background refresh in the query (under data range properties
-- Refresh control) , and in table options on the pivot table, check the box
by 'refresh on open'

I hope that helps!

Richard

"matpj" wrote:


Hi there,
I have a pivot table on one worksheet, that is refreshed from a range
of data on a second worksheet.

the data is refreshed using a query, so can contain different numbers
of rows.

how can I code it to always refresh using the complete range from the
data worksheet?

can anyone help?


--
matpj
------------------------------------------------------------------------
matpj's Profile: http://www.excelforum.com/member.php...o&userid=21076
View this thread: http://www.excelforum.com/showthread...hreadid=477871


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
Dynamic range in Pivot table Wanna Learn Excel Discussion (Misc queries) 4 July 2nd 07 08:08 PM
Using dynamic range to create pivot table cursednomore Excel Discussion (Misc queries) 5 March 12th 07 02:40 PM
Dynamic Range in a Pivot Table Chris C Excel Discussion (Misc queries) 0 June 27th 06 06:11 PM
Crate group of date, with Dynamic Range in pivot table not working Tiya Excel Discussion (Misc queries) 3 March 1st 06 02:26 PM
Refreshing a dynamic range variable Gromit Excel Programming 3 December 3rd 03 08:28 PM


All times are GMT +1. The time now is 06:04 PM.

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"