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

if i have a pivot table

how can i search multiple values by the label so that i can populate a new
spreadsheet

ex

you will notice in my 2 tables below that in my pivot table i don't have a
column b
but on my new table I do. How would i do this with code?

pivot table
a c d
a 1
b 2
c 3



new table

a b c d
a 1
b 2
c 3
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default access to xls

I am not quite sure where you are heading with the question but I think you
should be using the the ColumnRange property of a pivottable. Below is a way
to list all the columns in the pivot table range. Note that there are title
and Pivot value rows.


Sub PrintPivotLabels


Dim c As Object

Debug.Print "There are " &
ActiveSheet.PivotTables(1).ColumnRange.Cells.Count & " Columns"

For Each c In ActiveSheet.PivotTables(1).ColumnRange
Debug.Print c.Address & ":" & c.Value
next C

End Sub

Good Luck

--
Stewart Rogers
DataSort Software, L.C.


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
How do I access the access data via Excel 2002 with auto update ? karthik Excel Programming 1 February 9th 07 01:56 PM
Importing data from Access to Excel, but I need to vary the table from Access Liz L. Excel Programming 3 June 6th 06 02:12 AM
Access.Application.Quit - opens Access again then won't close - He Hluhluwe Excel Programming 0 January 30th 06 11:17 AM
Access data -work in Excel- save in Access s_u_resh Excel Programming 1 October 25th 04 12:52 PM
Getting Access Error Messages when running Access through Excel Dkline[_2_] Excel Programming 0 October 12th 04 09:35 PM


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