A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Sumproduct with a twist



 
 
Thread Tools Display Modes
  #1  
Old April 15th, 2010, 04:00 PM posted to microsoft.public.excel.worksheet.functions
Pam
external usenet poster
 
Posts: 131
Default Sumproduct with a twist

Hi,

Per code below supplied by Max in post dated 1/1/09 "Calculating the sum of
different categories over a given time period", I need a slight variation
that I can't seem to figure out.

=SUMPRODUCT((TEXT(B2:B1000,"mmmyy")="Dec08")*(A2:A 1000="Product
A"),C2:C1000)

I have a date field and a product field, but I also have two columns for
sales amounts. If column O = cc, I want to total column J (revised sales
amount). If column O cc, I want to total column I (sales amount). How
do accommodate for this with sumproduct?

Thanks in advance for any help.

Pam


  #2  
Old April 15th, 2010, 04:34 PM posted to microsoft.public.excel.worksheet.functions
Duke Carey
external usenet poster
 
Posts: 1,027
Default Sumproduct with a twist

You'll need two SUMPRODUCTS

=SUMPRODUCT((TEXT(B2:B1000,"mmmyy")="Dec08")*(A2:A 1000="Product
A"),--(o21000="cc"),j2:j1000)+=SUMPRODUCT((TEXT(B2:B10 00,"mmmyy")="Dec08")*(A2:A1000="Product A"),--(o21000"cc"),i2:i1000)


"Pam" wrote:

Hi,

Per code below supplied by Max in post dated 1/1/09 "Calculating the sum of
different categories over a given time period", I need a slight variation
that I can't seem to figure out.

=SUMPRODUCT((TEXT(B2:B1000,"mmmyy")="Dec08")*(A2:A 1000="Product
A"),C2:C1000)

I have a date field and a product field, but I also have two columns for
sales amounts. If column O = cc, I want to total column J (revised sales
amount). If column O cc, I want to total column I (sales amount). How
do accommodate for this with sumproduct?

Thanks in advance for any help.

Pam


.

  #3  
Old April 15th, 2010, 04:39 PM posted to microsoft.public.excel.worksheet.functions
JLatham
external usenet poster
 
Posts: 1,896
Default Sumproduct with a twist

For Revised Sales in J
=SUMPRODUCT((TEXT(B2:B1000,"mmmyy")="Dec08")*(A2:A 1000="Product
A")*(O2:O1000="cc"),J2:J1000)
and for sales amount in I
= SUMPRODUCT((TEXT(B2:B1000,"mmmyy")="Dec08")*(A2:A1 000="Product
A")*(O2:O1000"cc"),I2:I1000)

"Pam" wrote:

Hi,

Per code below supplied by Max in post dated 1/1/09 "Calculating the sum of
different categories over a given time period", I need a slight variation
that I can't seem to figure out.

=SUMPRODUCT((TEXT(B2:B1000,"mmmyy")="Dec08")*(A2:A 1000="Product
A"),C2:C1000)

I have a date field and a product field, but I also have two columns for
sales amounts. If column O = cc, I want to total column J (revised sales
amount). If column O cc, I want to total column I (sales amount). How
do accommodate for this with sumproduct?

Thanks in advance for any help.

Pam


.

  #4  
Old April 15th, 2010, 05:09 PM posted to microsoft.public.excel.worksheet.functions
Pam
external usenet poster
 
Posts: 131
Default Sumproduct with a twist

Duke,

Thanks so much for the solution. I never would have thought to add two
SUMPRODUCTS.

Thanks again,
Pam

"Duke Carey" wrote in message
...
You'll need two SUMPRODUCTS

=SUMPRODUCT((TEXT(B2:B1000,"mmmyy")="Dec08")*(A2:A 1000="Product
A"),--(o21000="cc"),j2:j1000)+=SUMPRODUCT((TEXT(B2:B10 00,"mmmyy")="Dec08")*(A2:A1000="Product
A"),--(o21000"cc"),i2:i1000)


"Pam" wrote:

Hi,

Per code below supplied by Max in post dated 1/1/09 "Calculating the sum
of
different categories over a given time period", I need a slight variation
that I can't seem to figure out.

=SUMPRODUCT((TEXT(B2:B1000,"mmmyy")="Dec08")*(A2:A 1000="Product
A"),C2:C1000)

I have a date field and a product field, but I also have two columns for
sales amounts. If column O = cc, I want to total column J (revised sales
amount). If column O cc, I want to total column I (sales amount).
How
do accommodate for this with sumproduct?

Thanks in advance for any help.

Pam


.



  #5  
Old April 16th, 2010, 11:26 AM posted to microsoft.public.excel.worksheet.functions
Steve Dunn
external usenet poster
 
Posts: 192
Default Sumproduct with a twist

Another option, untested but should work:

=SUMPRODUCT((TEXT(B2:B1000,"mmmyy")="Dec08")*(A2:A 1000="Product A"),
(O2:O1000="cc")*J2:J1000+(O2:O1000"cc")*I2:I2000 )

HTH
Steve.


"Pam" wrote in message
...
Hi,

Per code below supplied by Max in post dated 1/1/09 "Calculating the sum
of different categories over a given time period", I need a slight
variation that I can't seem to figure out.

=SUMPRODUCT((TEXT(B2:B1000,"mmmyy")="Dec08")*(A2:A 1000="Product
A"),C2:C1000)

I have a date field and a product field, but I also have two columns for
sales amounts. If column O = cc, I want to total column J (revised sales
amount). If column O cc, I want to total column I (sales amount). How
do accommodate for this with sumproduct?

Thanks in advance for any help.

Pam


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:05 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.