Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 304
Default Is there an equivalent of sumproduct but for count?

I have the following formla, but am look to do the same with "count". Thanks

=SUMPRODUCT(--('All Divisions'!A2:A3039="Eastern"),--('All
Divisions'!J2:J3039=30))
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,441
Default Is there an equivalent of sumproduct but for count?

That should return the COUNT of items "Eatern" and =30. Do you mean SUM, perhaps?

=SUMPRODUCT(('All Divisions'!A2:A3039="Eastern")*
('All Divisions'!J2:J3039=30)*('All Divisions'!J2:J3039))

HTH,
Bernie
MS Excel MVP


"PGarcia" wrote in message
...
I have the following formla, but am look to do the same with "count". Thanks

=SUMPRODUCT(--('All Divisions'!A2:A3039="Eastern"),--('All
Divisions'!J2:J3039=30))



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 304
Default Is there an equivalent of sumproduct but for count?

Thanks, but that gave me 41964 and it should have returned 395.

I was looking to get how many €śEastern€ť that are over 30 days old there are,
e.g. 3 or 25 day over 30. The formula provided adds up the days that are
there, e.g. 31 days, 45 days, 76 days, 103 days = 255

Tnanks.


"Bernie Deitrick" wrote:

That should return the COUNT of items "Eatern" and =30. Do you mean SUM, perhaps?

=SUMPRODUCT(('All Divisions'!A2:A3039="Eastern")*
('All Divisions'!J2:J3039=30)*('All Divisions'!J2:J3039))

HTH,
Bernie
MS Excel MVP


"PGarcia" wrote in message
...
I have the following formla, but am look to do the same with "count". Thanks

=SUMPRODUCT(--('All Divisions'!A2:A3039="Eastern"),--('All
Divisions'!J2:J3039=30))




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,441
Default Is there an equivalent of sumproduct but for count?

My point was that the formula that you posted:
=SUMPRODUCT(--('All Divisions'!A2:A3039="Eastern"),--('All Divisions'!J2:J3039=30))
should return your desired COUNT.

--
HTH,
Bernie
MS Excel MVP


"PGarcia" wrote in message
...
Thanks, but that gave me 41964 and it should have returned 395.

I was looking to get how many "Eastern" that are over 30 days old there are,
e.g. 3 or 25 day over 30. The formula provided adds up the days that are
there, e.g. 31 days, 45 days, 76 days, 103 days = 255

Tnanks.


"Bernie Deitrick" wrote:

That should return the COUNT of items "Eatern" and =30. Do you mean SUM, perhaps?

=SUMPRODUCT(('All Divisions'!A2:A3039="Eastern")*
('All Divisions'!J2:J3039=30)*('All Divisions'!J2:J3039))

HTH,
Bernie
MS Excel MVP


"PGarcia" wrote in message
...
I have the following formla, but am look to do the same with "count". Thanks

=SUMPRODUCT(--('All Divisions'!A2:A3039="Eastern"),--('All
Divisions'!J2:J3039=30))






  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 304
Default Is there an equivalent of sumproduct but for count?

I give me the sum of days 30. Here is the data:
Division Days Old
Eastern 59
Eastern 3
Eastern 3
Eastern 108
Eastern 105
Eastern 13
Eastern 13
Eastern 7
Eastern 7
Eastern 9
Eastern 10
Eastern 10
Eastern 90
Eastern 148

So, the formlua is giveing me the sum = 677, but I want the count =5

"Bernie Deitrick" wrote:

My point was that the formula that you posted:
=SUMPRODUCT(--('All Divisions'!A2:A3039="Eastern"),--('All Divisions'!J2:J3039=30))
should return your desired COUNT.

--
HTH,
Bernie
MS Excel MVP


"PGarcia" wrote in message
...
Thanks, but that gave me 41964 and it should have returned 395.

I was looking to get how many "Eastern" that are over 30 days old there are,
e.g. 3 or 25 day over 30. The formula provided adds up the days that are
there, e.g. 31 days, 45 days, 76 days, 103 days = 255

Tnanks.


"Bernie Deitrick" wrote:

That should return the COUNT of items "Eatern" and =30. Do you mean SUM, perhaps?

=SUMPRODUCT(('All Divisions'!A2:A3039="Eastern")*
('All Divisions'!J2:J3039=30)*('All Divisions'!J2:J3039))

HTH,
Bernie
MS Excel MVP


"PGarcia" wrote in message
...
I have the following formla, but am look to do the same with "count". Thanks

=SUMPRODUCT(--('All Divisions'!A2:A3039="Eastern"),--('All
Divisions'!J2:J3039=30))








  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,441
Default Is there an equivalent of sumproduct but for count?

Wtih your data (Eastern in column A, numbers in column J), the formula

=SUMPRODUCT(--('All Divisions'!A2:A3039="Eastern"),--('All Divisions'!J2:J3039=30))

returns 5.

This part

--('All Divisions'!A2:A3039="Eastern")

returns an array of 1s and 0s -- 1 when the cell in column A is "Eastern", and 0 when it isn't.

The other part returns an array of 1s and 0s, --- 1 when the value is =30.

Mutliplied together, they give the count.


You may have some data that you don't see waaaay down the sheet. Try this shorter formula with your
example data set.

=SUMPRODUCT(--('All Divisions'!A2:A15="Eastern"),--('All Divisions'!J2:J15=30))

That should definitely return 5, while

=SUMPRODUCT(--('All Divisions'!A2:A15="Eastern"),--('All Divisions'!J2:J15=30),('All
Divisions'!J2:J15))

should return 510.


HTH,
Bernie
MS Excel MVP


"PGarcia" wrote in message
...
I give me the sum of days 30. Here is the data:
Division Days Old
Eastern 59
Eastern 3
Eastern 3
Eastern 108
Eastern 105
Eastern 13
Eastern 13
Eastern 7
Eastern 7
Eastern 9
Eastern 10
Eastern 10
Eastern 90
Eastern 148

So, the formlua is giveing me the sum = 677, but I want the count =5

"Bernie Deitrick" wrote:

My point was that the formula that you posted:
=SUMPRODUCT(--('All Divisions'!A2:A3039="Eastern"),--('All Divisions'!J2:J3039=30))
should return your desired COUNT.

--
HTH,
Bernie
MS Excel MVP


"PGarcia" wrote in message
...
Thanks, but that gave me 41964 and it should have returned 395.

I was looking to get how many "Eastern" that are over 30 days old there are,
e.g. 3 or 25 day over 30. The formula provided adds up the days that are
there, e.g. 31 days, 45 days, 76 days, 103 days = 255

Tnanks.


"Bernie Deitrick" wrote:

That should return the COUNT of items "Eatern" and =30. Do you mean SUM, perhaps?

=SUMPRODUCT(('All Divisions'!A2:A3039="Eastern")*
('All Divisions'!J2:J3039=30)*('All Divisions'!J2:J3039))

HTH,
Bernie
MS Excel MVP


"PGarcia" wrote in message
...
I have the following formla, but am look to do the same with "count". Thanks

=SUMPRODUCT(--('All Divisions'!A2:A3039="Eastern"),--('All
Divisions'!J2:J3039=30))








  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 304
Default Is there an equivalent of sumproduct but for count?

I guess my mind is playing tricks on my. It does work. Thanks

"Bernie Deitrick" wrote:

Wtih your data (Eastern in column A, numbers in column J), the formula

=SUMPRODUCT(--('All Divisions'!A2:A3039="Eastern"),--('All Divisions'!J2:J3039=30))

returns 5.

This part

--('All Divisions'!A2:A3039="Eastern")

returns an array of 1s and 0s -- 1 when the cell in column A is "Eastern", and 0 when it isn't.

The other part returns an array of 1s and 0s, --- 1 when the value is =30.

Mutliplied together, they give the count.


You may have some data that you don't see waaaay down the sheet. Try this shorter formula with your
example data set.

=SUMPRODUCT(--('All Divisions'!A2:A15="Eastern"),--('All Divisions'!J2:J15=30))

That should definitely return 5, while

=SUMPRODUCT(--('All Divisions'!A2:A15="Eastern"),--('All Divisions'!J2:J15=30),('All
Divisions'!J2:J15))

should return 510.


HTH,
Bernie
MS Excel MVP


"PGarcia" wrote in message
...
I give me the sum of days 30. Here is the data:
Division Days Old
Eastern 59
Eastern 3
Eastern 3
Eastern 108
Eastern 105
Eastern 13
Eastern 13
Eastern 7
Eastern 7
Eastern 9
Eastern 10
Eastern 10
Eastern 90
Eastern 148

So, the formlua is giveing me the sum = 677, but I want the count =5

"Bernie Deitrick" wrote:

My point was that the formula that you posted:
=SUMPRODUCT(--('All Divisions'!A2:A3039="Eastern"),--('All Divisions'!J2:J3039=30))
should return your desired COUNT.

--
HTH,
Bernie
MS Excel MVP


"PGarcia" wrote in message
...
Thanks, but that gave me 41964 and it should have returned 395.

I was looking to get how many "Eastern" that are over 30 days old there are,
e.g. 3 or 25 day over 30. The formula provided adds up the days that are
there, e.g. 31 days, 45 days, 76 days, 103 days = 255

Tnanks.


"Bernie Deitrick" wrote:

That should return the COUNT of items "Eatern" and =30. Do you mean SUM, perhaps?

=SUMPRODUCT(('All Divisions'!A2:A3039="Eastern")*
('All Divisions'!J2:J3039=30)*('All Divisions'!J2:J3039))

HTH,
Bernie
MS Excel MVP


"PGarcia" wrote in message
...
I have the following formla, but am look to do the same with "count". Thanks

=SUMPRODUCT(--('All Divisions'!A2:A3039="Eastern"),--('All
Divisions'!J2:J3039=30))









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, count & sum Tasha Excel Worksheet Functions 2 August 24th 07 05:32 PM
count if or sumproduct? Suddes Excel Discussion (Misc queries) 5 March 15th 07 12:20 PM
Excel equivalent of sql group by count shikarishambu Excel Worksheet Functions 2 October 31st 06 04:09 PM
WORKDAY() Function Equivalent with SUMPRODUCT() George Ray Excel Worksheet Functions 4 October 9th 06 04:04 PM
Count if and Sumproduct Brento Excel Discussion (Misc queries) 2 June 20th 06 09:05 PM


All times are GMT +1. The time now is 04:41 PM.

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"