Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help with Selecting Ranges in Pivot Table


Much thanks in advance:
I have a pivot table, "Pivot1". For example sake, in column A I have
list of countries. In columns B through C, I have other attributes
that tie to column A (ie. cities, provinces, states, etc.) Note:
Subtotals in 'Field Settings' is set to NONE.

Pivot1
|ColumnA|----|Column B|-------|Column C|
USA-----------Illinois-------------Chicago
-----------------------------------Springfield
-----------------------------------East St. Louis
--------------Virginia-------------Richmond
-----------------------------------Midlothian
Canada ------Alberta-------------Edmonton
------------------------------------Calgary
Country3-----District-------------City1
------------------------------------City2



In another sheet, say "Sheet1" I have cell A1 that contains a country
name.

I would like a macro that selects the ranges in Pivot1 based on the
inputs in Sheet1!A1. I can't use a VLOOKUP because Column A has some
blanks.


In other words, in the example above, if A1 has "USA", I want the macro
to select everything from "USA" all the way down and over to
"Midlothian."


--
pikapika13
------------------------------------------------------------------------
pikapika13's Profile: http://www.excelforum.com/member.php...o&userid=10892
View this thread: http://www.excelforum.com/showthread...hreadid=527236

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Help with Selecting Ranges in Pivot Table

Look at the GetPivotData worksheet function. See Help for details.

--
Regards,
Tom Ogilvy


"pikapika13" wrote:


Much thanks in advance:
I have a pivot table, "Pivot1". For example sake, in column A I have
list of countries. In columns B through C, I have other attributes
that tie to column A (ie. cities, provinces, states, etc.) Note:
Subtotals in 'Field Settings' is set to NONE.

Pivot1
|ColumnA|----|Column B|-------|Column C|
USA-----------Illinois-------------Chicago
-----------------------------------Springfield
-----------------------------------East St. Louis
--------------Virginia-------------Richmond
-----------------------------------Midlothian
Canada ------Alberta-------------Edmonton
------------------------------------Calgary
Country3-----District-------------City1
------------------------------------City2



In another sheet, say "Sheet1" I have cell A1 that contains a country
name.

I would like a macro that selects the ranges in Pivot1 based on the
inputs in Sheet1!A1. I can't use a VLOOKUP because Column A has some
blanks.


In other words, in the example above, if A1 has "USA", I want the macro
to select everything from "USA" all the way down and over to
"Midlothian."


--
pikapika13
------------------------------------------------------------------------
pikapika13's Profile: http://www.excelforum.com/member.php...o&userid=10892
View this thread: http://www.excelforum.com/showthread...hreadid=527236


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help with Selecting Ranges in Pivot Table


I looked into GetPivotData, but that will only give me the subtotals. I
have text (instead of numbers) that need to be selected (to be copied
somewhere else later).


--
pikapika13
------------------------------------------------------------------------
pikapika13's Profile: http://www.excelforum.com/member.php...o&userid=10892
View this thread: http://www.excelforum.com/showthread...hreadid=527236

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Help with Selecting Ranges in Pivot Table

Nothing to stop you from looping through the data and getting the
information you need.

also use the find method of the range object. See Excel VBA help for
details

--
Regards,
Tom Ogilvy


"pikapika13" wrote
in message ...

I looked into GetPivotData, but that will only give me the subtotals. I
have text (instead of numbers) that need to be selected (to be copied
somewhere else later).


--
pikapika13
------------------------------------------------------------------------
pikapika13's Profile:

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



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
Selecting Pivot Table Raw Data Karen Excel Worksheet Functions 2 December 3rd 08 05:59 PM
How I can create a Pivot table by selecting two Different Pivot Rajini Excel Worksheet Functions 1 August 22nd 08 01:45 AM
Selecting Fields in Pivot Table Dan Excel Discussion (Misc queries) 2 April 8th 08 07:51 PM
Pivot Table Selecting Items AK Excel Programming 1 May 2nd 05 08:02 PM
Selecting Rows in Pivot Table MAB71 Excel Programming 2 October 20th 03 06:18 PM


All times are GMT +1. The time now is 11:49 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"