View Single Post
  #4   Report Post  
Myrna Larson
 
Posts: n/a
Default

Let's say your pivot table is now in A3:K28. A3 contains the button for the
page fields; the number of rows is variable. The row containing the column
headers is row 7

Define a name, say PTable1, to refer to the pivot table area. The upper left
cell in the named range should be the left-most cell in the row containing the
column headers, i.e. A7 in this example. To handle expansion of the table from
its current size, you should make the name refer to more rows than are now in
the table, so PTable1 could refer to A7:K100. (You could also make it refer to
more columns than you have now, if that could increase in the future.)

Then you can write a formula like

=COUNT(INDEX(PTable1,0,MATCH("Mail",INDEX(PTable1, 1,0),0)))-1

Look at Help for the INDEX function to understand what the "row 0" and "column
0" mean.


On 21 Feb 2005 04:44:53 -0800, "waxwing" wrote:

Thanks, Debra. I thought of this method but it isn't what I'm looking
for because the column to use in the calculation moves around. There
are about 10 contact types but depending on the specifc data set and
page field choices less can be showing so the column with the type I
need to use in the calculation moves around.

Could I use a multistep calculation such as? First determine the
address of the cell in row 2 that contains mail, then use the column
from that address in a count formula to count all numbers in the column
minus 1 to account for the grand total. I think this would work but
I'm not sure what functions to use to insert the address into the count
formula.

Thanks - John