Thread: SumIf
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Sandy Mann Sandy Mann is offline
external usenet poster
 
Posts: 2,345
Default SumIf

XL won't care what row it is in as long as it is always in the same column:

=SUMIF(A2:A4,"X",B2:B4)+SUMIF(A2:A4,"Y",B2:B4)

or:

=SUMPRODUCT((A2:A4={"X","Y"})*B2:B4)

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"juanpablo" wrote in message
...
Hello,

If I have the following Pivot Table:

PRODUCT WEEK1 WEEK2 WEEK3
X 32 12 4
Y 34 98 54
Z 6 2 9

And I want to add only X and Y for each week, how can I do it?
Remember this is a Pivot Table, so the products can change and they will
not
always be in the same row, so SUM wont work.

JP