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  

Help with SUMPRODUCT Function



 
 
Thread Tools Display Modes
  #1  
Old March 21st, 2009, 07:31 PM posted to microsoft.public.excel.worksheet.functions
mattyp
external usenet poster
 
Posts: 11
Default Help with SUMPRODUCT Function

Hello -
I'm in need of some help. I need to count the number of occurences (rows)
in a Worksheet, based on two criteria (column entries) in that row.

I've been trying to use the 'SUMPRODUCT' function, but keep winding up with
a value of 0 (although I know the answer should be 0, when I count portions
manually). The formula I've been trying to use is below:

=SUMPRODUCT((Data!K1:K3000="AL")*(Data!AB1:AB3000= "TRUE"))

Where "Data!" is the tab the information is on (the report/detail I'm
attempting to compile in on another tab), column K identifies the state (in
this case AL), and column AB is a flag for whether or not a product has been
included (the only values are True or False).

I've tried everything I can think of, but still can't seem to get this to
work. Any help would be most appreciated !

Thanks for your help,
- Matt



  #2  
Old March 21st, 2009, 07:37 PM posted to microsoft.public.excel.worksheet.functions
Mike H
external usenet poster
 
Posts: 8,419
Default Help with SUMPRODUCT Function

Hi,

Did you try removing the quotes from around TRUE?

=SUMPRODUCT((Data!K1:K3000="AL")*(Data!AB1:AB3000= TRUE))

Mike

"MattyP" wrote:

Hello -
I'm in need of some help. I need to count the number of occurences (rows)
in a Worksheet, based on two criteria (column entries) in that row.

I've been trying to use the 'SUMPRODUCT' function, but keep winding up with
a value of 0 (although I know the answer should be 0, when I count portions
manually). The formula I've been trying to use is below:

=SUMPRODUCT((Data!K1:K3000="AL")*(Data!AB1:AB3000= "TRUE"))

Where "Data!" is the tab the information is on (the report/detail I'm
attempting to compile in on another tab), column K identifies the state (in
this case AL), and column AB is a flag for whether or not a product has been
included (the only values are True or False).

I've tried everything I can think of, but still can't seem to get this to
work. Any help would be most appreciated !

Thanks for your help,
- Matt



  #3  
Old March 21st, 2009, 07:37 PM posted to microsoft.public.excel.worksheet.functions
Ron Coderre[_3_]
external usenet poster
 
Posts: 57
Default Help with SUMPRODUCT Function

I'm guessing that col_AB contains boolean values.
Try this:
=SUMPRODUCT((Data!K1:K3000="AL")*(Data!AB1:AB3000= TRUE))

Does that help?

Regards,

Ron Coderre
Microsoft MVP (Excel)

"MattyP" wrote in message
...
Hello -
I'm in need of some help. I need to count the number of occurences (rows)
in a Worksheet, based on two criteria (column entries) in that row.

I've been trying to use the 'SUMPRODUCT' function, but keep winding up
with
a value of 0 (although I know the answer should be 0, when I count
portions
manually). The formula I've been trying to use is below:

=SUMPRODUCT((Data!K1:K3000="AL")*(Data!AB1:AB3000= "TRUE"))

Where "Data!" is the tab the information is on (the report/detail I'm
attempting to compile in on another tab), column K identifies the state
(in
this case AL), and column AB is a flag for whether or not a product has
been
included (the only values are True or False).

I've tried everything I can think of, but still can't seem to get this to
work. Any help would be most appreciated !

Thanks for your help,
- Matt



  #4  
Old March 21st, 2009, 07:46 PM posted to microsoft.public.excel.worksheet.functions
Francis
external usenet poster
 
Posts: 206
Default Help with SUMPRODUCT Function

Hi
try this

=SUMPRODUCT((Data!K2:K10="AL")*(Data!AB2:AB10=TRUE ))

remove "" from TRUE
--
Hope this is helpful

Pls click the Yes button below if this post provide answer you have asked

I am an ordinary user trying to assist another

Thank You

cheers, francis



"MattyP" wrote:

Hello -
I'm in need of some help. I need to count the number of occurences (rows)
in a Worksheet, based on two criteria (column entries) in that row.

I've been trying to use the 'SUMPRODUCT' function, but keep winding up with
a value of 0 (although I know the answer should be 0, when I count portions
manually). The formula I've been trying to use is below:

=SUMPRODUCT((Data!K1:K3000="AL")*(Data!AB1:AB3000= "TRUE"))

Where "Data!" is the tab the information is on (the report/detail I'm
attempting to compile in on another tab), column K identifies the state (in
this case AL), and column AB is a flag for whether or not a product has been
included (the only values are True or False).

I've tried everything I can think of, but still can't seem to get this to
work. Any help would be most appreciated !

Thanks for your help,
- Matt



  #5  
Old March 21st, 2009, 07:52 PM posted to microsoft.public.excel.worksheet.functions
mattyp
external usenet poster
 
Posts: 11
Default Help with SUMPRODUCT Function

Thank you both......that did it ! (For some reason, I think assumed the
"comparison quotes" were needed since the value wasn't an actual #.......I
didn't even think to take boolean logic/values into account !).

Thanks again to you both for your help (and quick replies) --- I appreciate
it !
- Matt

"Ron Coderre" wrote:

I'm guessing that col_AB contains boolean values.
Try this:
=SUMPRODUCT((Data!K1:K3000="AL")*(Data!AB1:AB3000= TRUE))

Does that help?

Regards,

Ron Coderre
Microsoft MVP (Excel)

"MattyP" wrote in message
...
Hello -
I'm in need of some help. I need to count the number of occurences (rows)
in a Worksheet, based on two criteria (column entries) in that row.

I've been trying to use the 'SUMPRODUCT' function, but keep winding up
with
a value of 0 (although I know the answer should be 0, when I count
portions
manually). The formula I've been trying to use is below:

=SUMPRODUCT((Data!K1:K3000="AL")*(Data!AB1:AB3000= "TRUE"))

Where "Data!" is the tab the information is on (the report/detail I'm
attempting to compile in on another tab), column K identifies the state
(in
this case AL), and column AB is a flag for whether or not a product has
been
included (the only values are True or False).

I've tried everything I can think of, but still can't seem to get this to
work. Any help would be most appreciated !

Thanks for your help,
- Matt



  #6  
Old March 21st, 2009, 07:55 PM posted to microsoft.public.excel.worksheet.functions
Shane Devenshire[_3_]
external usenet poster
 
Posts: 3,333
Default Help with SUMPRODUCT Function

Hi,

Actually you can simplify your formula in the current case to read:

=SUMPRODUCT((Data!K1:K3000="AL")*Data!AB1:AB3000)

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"MattyP" wrote:

Hello -
I'm in need of some help. I need to count the number of occurences (rows)
in a Worksheet, based on two criteria (column entries) in that row.

I've been trying to use the 'SUMPRODUCT' function, but keep winding up with
a value of 0 (although I know the answer should be 0, when I count portions
manually). The formula I've been trying to use is below:

=SUMPRODUCT((Data!K1:K3000="AL")*(Data!AB1:AB3000= "TRUE"))

Where "Data!" is the tab the information is on (the report/detail I'm
attempting to compile in on another tab), column K identifies the state (in
this case AL), and column AB is a flag for whether or not a product has been
included (the only values are True or False).

I've tried everything I can think of, but still can't seem to get this to
work. Any help would be most appreciated !

Thanks for your help,
- Matt



  #7  
Old March 21st, 2009, 08:30 PM posted to microsoft.public.excel.worksheet.functions
T. Valko
external usenet poster
 
Posts: 15,759
Default Help with SUMPRODUCT Function

As long as column AB contains only the logical values TRUE or FALSE (or
empty cells):

=SUMPRODUCT(--(Data!K1:K3000="AL"),--Data!AB1:AB3000)

If you're using Excel 2007:

=COUNTIFS(Data!K1:K3000,"AL",Data!AB1:AB3000,TRUE)

--
Biff
Microsoft Excel MVP


"MattyP" wrote in message
...
Hello -
I'm in need of some help. I need to count the number of occurences (rows)
in a Worksheet, based on two criteria (column entries) in that row.

I've been trying to use the 'SUMPRODUCT' function, but keep winding up
with
a value of 0 (although I know the answer should be 0, when I count
portions
manually). The formula I've been trying to use is below:

=SUMPRODUCT((Data!K1:K3000="AL")*(Data!AB1:AB3000= "TRUE"))

Where "Data!" is the tab the information is on (the report/detail I'm
attempting to compile in on another tab), column K identifies the state
(in
this case AL), and column AB is a flag for whether or not a product has
been
included (the only values are True or False).

I've tried everything I can think of, but still can't seem to get this to
work. Any help would be most appreciated !

Thanks for your help,
- Matt





 




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:57 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.