Thread: Pivot Table
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Lori Lori is offline
external usenet poster
 
Posts: 340
Default Pivot Table

If you type an "=" and click the cell in the table you should get a
dynamic formula:

=GETPIVOTDATA("3",$A$1,"1","a","2","e")

Then you could replace "a" and "e" by cell references

Alternatively, if you want to use lookup functions try:

=LOOKUP(2,1/(LOOKUP(ROW(A2:A5),ROW(A2:A5)/(A2:A5<""),A2:A5)="a")
/(B2:B5="e"),C2:C5)

The key to the formula is:
LOOKUP(ROW(A2:A5),ROW(A2:A5)/(A2:A5<""),A2:A5) which fills in blanks
in the first column.

Terence wrote:

I have a Pivot Table below where column 1 has the value 'a' for my 3 rows of
data. How can I do a vlookup on column 1 with the value 'a' and column 2
with the value 'e' and return my total of 3?

Count of 3
1 2 Total
a d 2
e 3
n 1
a Total 6
Grand Total 6