![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Location: London
Posts: 46
|
Hi all,
I have a macro which pulls data from the totals row of a pivot table. The amount of rows in the pivot table is determined by records in an ODBC link from a database. The problem is, this means the amount of rows changes and therefore the totals row of the pivot table is not in a static position. e.g. the ODBC link has figures relating to four different people - Bob, Harry, Fred and Bert. The sum of their totals is stored in cell F3. So the macro grabs the data from F3. However the following day Jane is added to the data in the ODBC link, pushing the total to cell G3. The macro is still set at F3 so it now picks up the wrong figure. Make sense? Is there a way around this? Thanks for any help |
|
|
|
|
|
#2 |
|
Banned
Join Date: Feb 2002
Posts: 1,582
|
|
|
|
|
|
|
#3 |
|
New Member
Join Date: Mar 2002
Location: London
Posts: 46
|
Cheers Dave.
Spent ages trying to sort that one out. Greg |
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
Use the GETPIVOTDATA worksheet function. See the Help index topic for this function.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|