Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 56
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,081
Default Sumproduct with a twist

You'll need two SUMPRODUCTS

=SUMPRODUCT((TEXT(B2:B1000,"mmmyy")="Dec08")*(A2:A 1000="Product
A"),--(o2:o1000="cc"),j2:j1000)+=SUMPRODUCT((TEXT(B2:B10 00,"mmmyy")="Dec08")*(A2:A1000="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


.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,203
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 56
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"),--(o2:o1000="cc"),j2:j1000)+=SUMPRODUCT((TEXT(B2:B10 00,"mmmyy")="Dec08")*(A2:A1000="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


.



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 193
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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SUMPRODUCT multiple criteria (with a twist) GD Excel Worksheet Functions 13 March 25th 10 07:39 PM
Sum with a Twist Q Seanie Excel Worksheet Functions 0 December 30th 08 02:29 PM
Sum with a Twist Q Seanie Excel Worksheet Functions 2 December 30th 08 01:11 PM
If but with a twist:( AVB Over My Head New Users to Excel 3 September 16th 08 04:43 AM
Sum with a twist andrew Excel Discussion (Misc queries) 15 June 18th 08 08:56 AM


All times are GMT +1. The time now is 12:49 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"