Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 102
Default sumproduct question please

Hi everyone

I have a list of names in column a - I then have data in various other
columns which is copied from other worksheets (Columns B, F and J are names)
I want to sum how many time a name in column a is listed in the others so
have entered as:

=SUMPRODUCT(($B$2:$B$500=A2)*($F$2:$F$500=A2)*($J$ 2:$J$500=A2))

But this is not calculating correctly - can someone pls advise what step I'm
missing??
--
Thanks as always

Lise
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default sumproduct question please

Try
=COUNTIF(A:A,A1)+COUNTIF(F:F,A1)+COUNTIF(J:J,A1)

--
Jacob


"Lise" wrote:

Hi everyone

I have a list of names in column a - I then have data in various other
columns which is copied from other worksheets (Columns B, F and J are names)
I want to sum how many time a name in column a is listed in the others so
have entered as:

=SUMPRODUCT(($B$2:$B$500=A2)*($F$2:$F$500=A2)*($J$ 2:$J$500=A2))

But this is not calculating correctly - can someone pls advise what step I'm
missing??
--
Thanks as always

Lise

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 905
Default sumproduct question please

"Lise" wrote:
I want to sum how many time a name in column a is listed in the others so
have entered as:
=SUMPRODUCT(($B$2:$B$500=A2)*($F$2:$F$500=A2)*($J$ 2:$J$500=A2))


When you use "*" in that context, it is behaving like AND. In other words,
it is counting how many times A2 appears in __all_three__ columns in the
same row.

I think you want:

=SUMPRODUCT(($B$2:$B$500=A2)+($F$2:$F$500=A2)+($J$ 2:$J$500=A2))

That will count the number of instances of A2 in any of the three columns.

In other words, if A2 appears in two columns in a particular row, it will
add 2 to the count.

If, instead, your intent is to count how many rows that A2 appears
__at_least_once__ in any of the threes columns, you might want:

=SUMPRODUCT(--(($B$2:$B$500=A2)+($F$2:$F$500=A2)+($J$2:$J$500=A2 )0))

That will add 1 to the count if A2 appears in one, two or all three columns
in the same row.


----- original message -----

"Lise" wrote in message
...
Hi everyone

I have a list of names in column a - I then have data in various other
columns which is copied from other worksheets (Columns B, F and J are
names)
I want to sum how many time a name in column a is listed in the others so
have entered as:

=SUMPRODUCT(($B$2:$B$500=A2)*($F$2:$F$500=A2)*($J$ 2:$J$500=A2))

But this is not calculating correctly - can someone pls advise what step
I'm
missing??
--
Thanks as always

Lise


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default sumproduct question please

=SUMPRODUCT(($B$2:$B$500=A2)+($F$2:$F$500=A2)+($J$ 2:$J$500=A2))

OR

=COUNTIF(B:B,A1)+COUNTIF(F:F,A1)+COUNTIF(J:J,A1)


--
Jacob


"Lise" wrote:

Hi everyone

I have a list of names in column a - I then have data in various other
columns which is copied from other worksheets (Columns B, F and J are names)
I want to sum how many time a name in column a is listed in the others so
have entered as:

=SUMPRODUCT(($B$2:$B$500=A2)*($F$2:$F$500=A2)*($J$ 2:$J$500=A2))

But this is not calculating correctly - can someone pls advise what step I'm
missing??
--
Thanks as always

Lise

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 102
Default sumproduct question please

Thankyou both, fabulous
--


Lise


"Joe User" wrote:

"Lise" wrote:
I want to sum how many time a name in column a is listed in the others so
have entered as:
=SUMPRODUCT(($B$2:$B$500=A2)*($F$2:$F$500=A2)*($J$ 2:$J$500=A2))


When you use "*" in that context, it is behaving like AND. In other words,
it is counting how many times A2 appears in __all_three__ columns in the
same row.

I think you want:

=SUMPRODUCT(($B$2:$B$500=A2)+($F$2:$F$500=A2)+($J$ 2:$J$500=A2))

That will count the number of instances of A2 in any of the three columns.

In other words, if A2 appears in two columns in a particular row, it will
add 2 to the count.

If, instead, your intent is to count how many rows that A2 appears
__at_least_once__ in any of the threes columns, you might want:

=SUMPRODUCT(--(($B$2:$B$500=A2)+($F$2:$F$500=A2)+($J$2:$J$500=A2 )0))

That will add 1 to the count if A2 appears in one, two or all three columns
in the same row.


----- original message -----

"Lise" wrote in message
...
Hi everyone

I have a list of names in column a - I then have data in various other
columns which is copied from other worksheets (Columns B, F and J are
names)
I want to sum how many time a name in column a is listed in the others so
have entered as:

=SUMPRODUCT(($B$2:$B$500=A2)*($F$2:$F$500=A2)*($J$ 2:$J$500=A2))

But this is not calculating correctly - can someone pls advise what step
I'm
missing??
--
Thanks as always

Lise


.

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 Question MrRJ Excel Discussion (Misc queries) 4 February 6th 09 07:14 PM
I think I know how to ask this sumproduct question now: Gina[_2_] Excel Worksheet Functions 3 July 22nd 08 10:01 PM
SumProduct Question mldancing Excel Discussion (Misc queries) 15 April 6th 07 03:52 AM
SUMPRODUCT question Melissa Excel Discussion (Misc queries) 4 August 24th 06 10:44 AM
SumProduct Question Carl Excel Worksheet Functions 1 August 23rd 06 11:55 PM


All times are GMT +1. The time now is 10:57 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"