Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 58
Default sumproduct for multiple criteria in different columns

I have been trying to use this site to run a sumproduct formula for the below:

A B C D
E F G
projid status targetedstartdate targetedcompldate amountbilled
Onsched.


I want to count how many times the instances of a number with the prefix
B00000 or BPR000000 occur in column A (called projid) and when "Late" occurs
in column G (called Onsched.)

There are 4300 rows of data.

my formula is:
=SUMPRODUCT(A2:A4300="B*")*(G2:G4300="Late")

I don't get a sum of the values. Any ideas?

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default sumproduct for multiple criteria in different columns

*Maybe* this:

=SUMPRODUCT(--(LEFT(A2:A4300)="B"),--(G2:G4300="Late"))

If there are entries other than B00000 or BPR000000 that start with "B" they
may be calculated. In that case we'll have to refine the condition.


--
Biff
Microsoft Excel MVP


"gbpg" wrote in message
...
I have been trying to use this site to run a sumproduct formula for the
below:

A B C D
E F G
projid status targetedstartdate targetedcompldate amountbilled
Onsched.


I want to count how many times the instances of a number with the prefix
B00000 or BPR000000 occur in column A (called projid) and when "Late"
occurs
in column G (called Onsched.)

There are 4300 rows of data.

my formula is:
=SUMPRODUCT(A2:A4300="B*")*(G2:G4300="Late")

I don't get a sum of the values. Any ideas?



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default sumproduct for multiple criteria in different columns

Try it this way...

=SUMPRODUCT((LEFT(A2:A43)="B")*(G2:G43="Late"))

Although it wouldn't make a difference to your result, you were missing a
set of parentheses around the multiplication of the two logical expressions,
so SUMPRODUCT took the first logical expression as its argument and
multiplied its result times the second logical expression (which, being
outside the SUMPRODUCT function, wouldn't be an array, I guess).

Rick


"gbpg" wrote in message
...
I have been trying to use this site to run a sumproduct formula for the
below:

A B C D
E F G
projid status targetedstartdate targetedcompldate amountbilled
Onsched.


I want to count how many times the instances of a number with the prefix
B00000 or BPR000000 occur in column A (called projid) and when "Late"
occurs
in column G (called Onsched.)

There are 4300 rows of data.

my formula is:
=SUMPRODUCT(A2:A4300="B*")*(G2:G4300="Late")

I don't get a sum of the values. Any ideas?


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 58
Default sumproduct for multiple criteria in different columns

they both returned the same value of 214 (after I changed Ricks 43 to 4309).
Thanks guys, I am still not sure why mine did not work. If I need to
substitute the B* for say BPR* would this still work?

"Rick Rothstein (MVP - VB)" wrote:

Try it this way...

=SUMPRODUCT((LEFT(A2:A43)="B")*(G2:G43="Late"))

Although it wouldn't make a difference to your result, you were missing a
set of parentheses around the multiplication of the two logical expressions,
so SUMPRODUCT took the first logical expression as its argument and
multiplied its result times the second logical expression (which, being
outside the SUMPRODUCT function, wouldn't be an array, I guess).

Rick


"gbpg" wrote in message
...
I have been trying to use this site to run a sumproduct formula for the
below:

A B C D
E F G
projid status targetedstartdate targetedcompldate amountbilled
Onsched.


I want to count how many times the instances of a number with the prefix
B00000 or BPR000000 occur in column A (called projid) and when "Late"
occurs
in column G (called Onsched.)

There are 4300 rows of data.

my formula is:
=SUMPRODUCT(A2:A4300="B*")*(G2:G4300="Late")

I don't get a sum of the values. Any ideas?



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default sumproduct for multiple criteria in different columns

In that case use:

=SUMPRODUCT(--(LEFT(A2:A4300,3)="BPR"),--(G2:G4300="Late"))

Or, use cells to hold the criteria:

J1 = B or BPR
K1 = Late

=SUMPRODUCT(--(LEFT(A2:A4300,LEN(J1))=J1),--(G2:G4300=K1))



--
Biff
Microsoft Excel MVP


"gbpg" wrote in message
...
they both returned the same value of 214 (after I changed Ricks 43 to
4309).
Thanks guys, I am still not sure why mine did not work. If I need to
substitute the B* for say BPR* would this still work?

"Rick Rothstein (MVP - VB)" wrote:

Try it this way...

=SUMPRODUCT((LEFT(A2:A43)="B")*(G2:G43="Late"))

Although it wouldn't make a difference to your result, you were missing a
set of parentheses around the multiplication of the two logical
expressions,
so SUMPRODUCT took the first logical expression as its argument and
multiplied its result times the second logical expression (which, being
outside the SUMPRODUCT function, wouldn't be an array, I guess).

Rick


"gbpg" wrote in message
...
I have been trying to use this site to run a sumproduct formula for the
below:

A B C D
E F G
projid status targetedstartdate targetedcompldate amountbilled
Onsched.


I want to count how many times the instances of a number with the
prefix
B00000 or BPR000000 occur in column A (called projid) and when "Late"
occurs
in column G (called Onsched.)

There are 4300 rows of data.

my formula is:
=SUMPRODUCT(A2:A4300="B*")*(G2:G4300="Late")

I don't get a sum of the values. Any ideas?





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
Sum with multiple criteria using SUMPRODUCT Conan Kelly Excel Worksheet Functions 2 March 26th 08 06:54 PM
SumProduct With Multiple criteria Tony D Excel Worksheet Functions 1 February 24th 06 09:26 PM
sumproduct 2 columns based on criteria in 3rd column excel guru i''m not Excel Discussion (Misc queries) 5 December 31st 05 03:47 PM
multiple criteria in if or sumproduct tbird0566 Excel Worksheet Functions 1 September 19th 05 09:11 PM
sumproduct using multiple criteria tifosi3 Excel Worksheet Functions 2 January 6th 05 08:46 PM


All times are GMT +1. The time now is 08:52 AM.

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

About Us

"It's about Microsoft Excel"