A Pivot Table challenge--I can't do it, can you?
Hi Lawrence,
If you can sort the data by Division then Department then Vendor you can add
a faster formula than sumproduct:
assuming vendor is in column D and the data starts in column 2 then add a
Counter column in E2
=IF(D1=d2,0,1)
and copy down for the 15000 rows.
Then just add the counter column to the pivot: SUM will give you the answer.
regards
Charles Williams
Decision Models
"LawrenceHG" wrote in message
...
Roger--
All hail thee king of the MVPs! It works.
Very clever...I've seen this type of formula before, but I hadn't added it
to my bag of tricks...perhaps now I will.
I'm having trouble getting it to work on all 19,000 rows...the calculation
time is immense, but I verified it on a subset of the data.
Thanks for your help. I've really learned something good.
"Roger Govier" wrote:
Hi Lawrence
You will need to add another column to your source table Named Count
In D2 enter
=IF(SUMPRODUCT(($A$2:$A2=A2)*($B$2:$B2=$B2)*($C$2: $C2=C2))=1,1,0)
and copy down
Add the Count Column to the source range for your PT, and use Sum of
Count
as your data field
--
Regards
Roger Govier
|