LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default Automatic GETPIVOTDATA formula generation from within VBA?

If I have a pivot table and I want a formula outside of the table
to refer to one of the table values, I just type "=" and click on
the pivot cell, and Excel automatically generates the appropriate
GETPIVOTDATA(...) formula. This is very convenient (and I know
how to turn the feature off if necessary).

But what if I want to do the same thing from within VBA? Recording
a macro I see something like:

ActiveCell.FormulaR1C1 = "=GETPIVOTDATA(""Data_Field"",R13C26,""Field_1""," "Value_1"",...)"

Conceptually this is easy, but in practice constructing all the
formula strings I'm going to need is going to be a pain. Is there
any way I can ask Excel to construct a GETPIVOTDATA formula
automatically by specifying the cell, the way it works when I do
it by hand?
--
John Brock


 
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
Automatic generation of next number kbush Excel Discussion (Misc queries) 1 March 18th 08 01:49 PM
Automatic File Name Generation Steven Leuck Excel Discussion (Misc queries) 15 June 10th 07 05:13 AM
Automatic number generation. BM Excel Discussion (Misc queries) 1 August 14th 06 02:38 PM
Automatic List Generation JerryS Excel Worksheet Functions 8 March 15th 06 07:01 PM
Is there any way to disable the "getpivotdata" automatic formula? BGN Excel Worksheet Functions 2 September 2nd 05 01:07 AM


All times are GMT +1. The time now is 02:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"