#1   Report Post  
Posted to microsoft.public.excel.misc
SteveC
 
Posts: n/a
Default Sumproduct with And?

=SUMPRODUCT(--(Master!$A$7:$A$467=B5),Master!$B$7:$B$467)

that works. But:

=SUMPRODUCT(--(Master!$A$7:$A$467=or(B5,b6,b7,b8)),Master!$B$7:$ B$467)

doesn't.

Basically, I'm trying to add together numbers that match any label in b5:b8

To further explain, and not to confuse the mattter:
so if b5:b8 include apples, bannansas, pears, pineapples, then I can have
sum all these and label this new cell "Fruit"

any suggestions? thanks very much!
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bernard Liengme
 
Posts: n/a
Default Sumproduct with And?

Try
=SUMPRODUCT(--(Master!$A$7:$A$467=B5:B8),Master!$B$7:$B$467)

OR
=SUMPRODUCT(--((Master!$A$7:$A$467=B5)+(Master!$A$7:$A$467=B6)+( Master!$A$7:$A$467=B7)+(Master!$A$7:$A$467=B8)),Ma ster!$B$7:$B$467)

OR
Select B5:B8 and use Insert|Name|Define and give it a name such as MyList
then use
=SUMPRODUCT(--(Master!$A$7:$A$467=myList),Master!$B$7:$B$467)


--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"SteveC" wrote in message
...
=SUMPRODUCT(--(Master!$A$7:$A$467=B5),Master!$B$7:$B$467)

that works. But:

=SUMPRODUCT(--(Master!$A$7:$A$467=or(B5,b6,b7,b8)),Master!$B$7:$ B$467)

doesn't.

Basically, I'm trying to add together numbers that match any label in
b5:b8

To further explain, and not to confuse the mattter:
so if b5:b8 include apples, bannansas, pears, pineapples, then I can have
sum all these and label this new cell "Fruit"

any suggestions? thanks very much!



  #3   Report Post  
Posted to microsoft.public.excel.misc
Miguel Zapico
 
Posts: n/a
Default Sumproduct with And?

You may try this one:
=SUMPRODUCT((Master!$A$7:$A$467=B5)+(Master!$A$7:$ A$467=B6)+(Master!$A$7:$A$467=B7)+(Master!$A$7:$A$ 467=B8),Master!$B$7:$B$467)
This will add the four different arrays from each condition on a single
array, that is what SUMPRODUCT accepts as the entry.
The formula OR checks for TRUE or FALSE in its parameters list, and returns
TRUE or FALSE, that it is not what you need in this case.

Hope this helps,
Miguel.

"SteveC" wrote:

=SUMPRODUCT(--(Master!$A$7:$A$467=B5),Master!$B$7:$B$467)

that works. But:

=SUMPRODUCT(--(Master!$A$7:$A$467=or(B5,b6,b7,b8)),Master!$B$7:$ B$467)

doesn't.

Basically, I'm trying to add together numbers that match any label in b5:b8

To further explain, and not to confuse the mattter:
so if b5:b8 include apples, bannansas, pears, pineapples, then I can have
sum all these and label this new cell "Fruit"

any suggestions? thanks very much!

  #4   Report Post  
Posted to microsoft.public.excel.misc
Bob Umlas, Excel MVP
 
Posts: n/a
Default Sumproduct with And?

=SUMPRODUCT(--NOT(ISERROR(MATCH(Master!$A$7:$A$467,B5:B8,0))),Ma ster!$B$7:$B$467)

"SteveC" wrote:

=SUMPRODUCT(--(Master!$A$7:$A$467=B5),Master!$B$7:$B$467)

that works. But:

=SUMPRODUCT(--(Master!$A$7:$A$467=or(B5,b6,b7,b8)),Master!$B$7:$ B$467)

doesn't.

Basically, I'm trying to add together numbers that match any label in b5:b8

To further explain, and not to confuse the mattter:
so if b5:b8 include apples, bannansas, pears, pineapples, then I can have
sum all these and label this new cell "Fruit"

any suggestions? thanks very much!

  #5   Report Post  
Posted to microsoft.public.excel.misc
Peo Sjoblom
 
Posts: n/a
Default Sumproduct with And?

A couple of ways


=SUMPRODUCT(--(ISNUMBER(MATCH(Master!$A$7:$A$467,$B$5:$B$8,0))), Master!$B$7:$B$467)

or

=SUM((Master!$A$7:$A$467=TRANSPOSE($B$5:$B$8))*(Ma ster!$B$7:$B$467))

the latter entered with ctrl + shift & enter


Regards,

Peo Sjoblom

"SteveC" wrote:

=SUMPRODUCT(--(Master!$A$7:$A$467=B5),Master!$B$7:$B$467)

that works. But:

=SUMPRODUCT(--(Master!$A$7:$A$467=or(B5,b6,b7,b8)),Master!$B$7:$ B$467)

doesn't.

Basically, I'm trying to add together numbers that match any label in b5:b8

To further explain, and not to confuse the mattter:
so if b5:b8 include apples, bannansas, pears, pineapples, then I can have
sum all these and label this new cell "Fruit"

any suggestions? thanks very much!



  #6   Report Post  
Posted to microsoft.public.excel.misc
SteveC
 
Posts: n/a
Default Sumproduct with And?

Hey thanks,

I get a #N/A error when I try your 1 and 3 methods... the 2nd one works of
course, but it's kind of long...

"Bernard Liengme" wrote:

Try
=SUMPRODUCT(--(Master!$A$7:$A$467=B5:B8),Master!$B$7:$B$467)

OR
=SUMPRODUCT(--((Master!$A$7:$A$467=B5)+(Master!$A$7:$A$467=B6)+( Master!$A$7:$A$467=B7)+(Master!$A$7:$A$467=B8)),Ma ster!$B$7:$B$467)

OR
Select B5:B8 and use Insert|Name|Define and give it a name such as MyList
then use
=SUMPRODUCT(--(Master!$A$7:$A$467=myList),Master!$B$7:$B$467)


--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"SteveC" wrote in message
...
=SUMPRODUCT(--(Master!$A$7:$A$467=B5),Master!$B$7:$B$467)

that works. But:

=SUMPRODUCT(--(Master!$A$7:$A$467=or(B5,b6,b7,b8)),Master!$B$7:$ B$467)

doesn't.

Basically, I'm trying to add together numbers that match any label in
b5:b8

To further explain, and not to confuse the mattter:
so if b5:b8 include apples, bannansas, pears, pineapples, then I can have
sum all these and label this new cell "Fruit"

any suggestions? thanks very much!




  #7   Report Post  
Posted to microsoft.public.excel.misc
SteveC
 
Posts: n/a
Default Sumproduct with And?

Miguel, Bernard, Bob, Peo, thanks for all your help... while using multiple +
signs works, Bob's or Peo's are the most efficient... thanks very much!

  #8   Report Post  
Posted to microsoft.public.excel.misc
Domenic
 
Posts: n/a
Default Sumproduct with And?

Try...

=SUMPRODUCT(--ISNUMBER(MATCH(Master!$A$7:$A$467,B5:B8,0)),Master !$B$7:$B$
467)

Hope this helps!

In article ,
SteveC wrote:

Hey thanks,

I get a #N/A error when I try your 1 and 3 methods... the 2nd one works of
course, but it's kind of long...

"Bernard Liengme" wrote:

Try
=SUMPRODUCT(--(Master!$A$7:$A$467=B5:B8),Master!$B$7:$B$467)

OR
=SUMPRODUCT(--((Master!$A$7:$A$467=B5)+(Master!$A$7:$A$467=B6)+( Master!$A$7:
$A$467=B7)+(Master!$A$7:$A$467=B8)),Master!$B$7:$B $467)

OR
Select B5:B8 and use Insert|Name|Define and give it a name such as MyList
then use
=SUMPRODUCT(--(Master!$A$7:$A$467=myList),Master!$B$7:$B$467)


--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"SteveC" wrote in message
...
=SUMPRODUCT(--(Master!$A$7:$A$467=B5),Master!$B$7:$B$467)

that works. But:

=SUMPRODUCT(--(Master!$A$7:$A$467=or(B5,b6,b7,b8)),Master!$B$7:$ B$467)

doesn't.

Basically, I'm trying to add together numbers that match any label in
b5:b8

To further explain, and not to confuse the mattter:
so if b5:b8 include apples, bannansas, pears, pineapples, then I can have
sum all these and label this new cell "Fruit"

any suggestions? thanks very much!




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
Need help with sumproduct & dynamic ranges bill_s1416 Excel Worksheet Functions 1 March 19th 06 03:36 AM
Need help with sumproduct and dynamic ranges Bill_S Excel Worksheet Functions 2 March 19th 06 01:19 AM
Sumproduct Peter B Excel Worksheet Functions 1 March 7th 05 01:59 PM
Sumproduct function not working Scott Summerlin Excel Worksheet Functions 12 December 4th 04 05:15 AM
adding two sumproduct formulas together ski2004_2005 Excel Worksheet Functions 1 November 12th 04 09:08 PM


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