VBA and Pivot Tables - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


VBA and Pivot Tables

palphapalpha Posts: 4Member
I have a worksheet containing seven pivot tables. A VBA macro then takes the results from the PT and carries out other operations. The worksheet was created using Excel 2002. I now find that the worksheet will not work using Excel 2007 because the pivot table is not compatible. I have seen somewhere VBA code that will carry out the same function as a pivot table; in this case to count the number of unique numbers in one column (column A) and add the numbers in the adjacent column (column B).

A B The result here would be 100 x 8
100 6 200 x 5 and 300 x 4
200 4 The number count is 3
100 2
300 4
200 1

There is no problem with code that will place the result in another part of the worksheet then the macro can work on it later.

Thanks in advance
Sign In or Register to comment.