Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
ericsh
 
Posts: n/a
Default Like Sumproduct, But Different


I've used the sumproduct function to add values the meet multiple
conditions. I'm looking for a similar function that would multiply the
values. For instance, given the following data:

A B C
x 1 7 3
y 2 8 4
z 3 9 5
x 4 0 6
y 5 1 7
z 6 2 8


sumproduct((ABC="B")*(xyz="z"),values) = 11

I want something that will find the values that meet my conditions and
then multiplies them. In this case, Bz#1=9 and Bz#2=2, so the result
would be 18.

Thanks,
Eric


--
ericsh
------------------------------------------------------------------------
ericsh's Profile: http://www.excelforum.com/member.php...o&userid=26149
View this thread: http://www.excelforum.com/showthread...hreadid=394775

  #2   Report Post  
Domenic
 
Posts: n/a
Default


Assumptions:

B1:D1 contains A, B, and C

A2:A7 contains x, y, z, x, y, and z

B2:D7 contains your data


Formula:

=PRODUCT(IF(A2:A7="z",INDEX(B2:D7,0,MATCH("B",B1:D 1,0))))

...confirmed with CONTROL+SHIFT+ENTER, not just ENTER.

Hope this helps!

ericsh Wrote:
I've used the sumproduct function to add values the meet multiple
conditions. I'm looking for a similar function that would multiply the
values. For instance, given the following data:

A B C
x 1 7 3
y 2 8 4
z 3 9 5
x 4 0 6
y 5 1 7
z 6 2 8


sumproduct((ABC="B")*(xyz="z"),values) = 11

I want something that will find the values that meet my conditions and
then multiplies them. In this case, Bz#1=9 and Bz#2=2, so the result
would be 18.

Thanks,
Eric



--
Domenic
------------------------------------------------------------------------
Domenic's Profile: http://www.excelforum.com/member.php...o&userid=10785
View this thread: http://www.excelforum.com/showthread...hreadid=394775

  #3   Report Post  
Michael
 
Posts: n/a
Default

Hi Domenic
Wouldn't this do the same thing.

=PRODUCT(IF(A4:A9="Z",C4:C9,""))

If I don't ask, I don't learn

Regards
Michael Mitchelson


"ericsh" wrote:


I've used the sumproduct function to add values the meet multiple
conditions. I'm looking for a similar function that would multiply the
values. For instance, given the following data:

A B C
x 1 7 3
y 2 8 4
z 3 9 5
x 4 0 6
y 5 1 7
z 6 2 8


sumproduct((ABC="B")*(xyz="z"),values) = 11

I want something that will find the values that meet my conditions and
then multiplies them. In this case, Bz#1=9 and Bz#2=2, so the result
would be 18.

Thanks,
Eric


--
ericsh
------------------------------------------------------------------------
ericsh's Profile: http://www.excelforum.com/member.php...o&userid=26149
View this thread: http://www.excelforum.com/showthread...hreadid=394775


  #4   Report Post  
Harlan Grove
 
Posts: n/a
Default

ericsh wrote...
I've used the sumproduct function to add values the meet multiple
conditions. I'm looking for a similar function that would multiply the
values. For instance, given the following data:

A B C
x 1 7 3
y 2 8 4
z 3 9 5
x 4 0 6
y 5 1 7
z 6 2 8

sumproduct((ABC="B")*(xyz="z"),values) = 11

I want something that will find the values that meet my conditions and
then multiplies them. In this case, Bz#1=9 and Bz#2=2, so the result
would be 18.

....

You have zeros in your values, so the following won't work. But it you
had only positive numbers, you could have used

=EXP(SUMPRODUCT((ABC="B")*(xyz="z"),LN(values)))

  #5   Report Post  
Domenic
 
Posts: n/a
Default


Hi Michael,

If you always want Column C (labelled B) evaluated, then yes. But if
you change my formula as follows...

=PRODUCT(IF(A2:A7=G1,INDEX(B2:D7,0,MATCH(H1,B1:D1, 0))))

...where G1 contains the first crieterion, such as 'x', and H1 contains
the second criterion, such as 'B', then you can select the column you
want evaluated by entering the appropriate label in H1, such as A, B,
or C. If I'm not mistaken, I think that's what the OP was looking for.
:)

Michael Wrote:
Hi Domenic
Wouldn't this do the same thing.

=PRODUCT(IF(A4:A9="Z",C4:C9,""))

If I don't ask, I don't learn

Regards
Michael Mitchelson



--
Domenic
------------------------------------------------------------------------
Domenic's Profile: http://www.excelforum.com/member.php...o&userid=10785
View this thread: http://www.excelforum.com/showthread...hreadid=394775



  #6   Report Post  
Michael
 
Posts: n/a
Default

Thanks Domenic
I see the point.
Another one for the Michael archives

Regards
Michael Mitchelson


"Domenic" wrote:


Hi Michael,

If you always want Column C (labelled B) evaluated, then yes. But if
you change my formula as follows...

=PRODUCT(IF(A2:A7=G1,INDEX(B2:D7,0,MATCH(H1,B1:D1, 0))))

...where G1 contains the first crieterion, such as 'x', and H1 contains
the second criterion, such as 'B', then you can select the column you
want evaluated by entering the appropriate label in H1, such as A, B,
or C. If I'm not mistaken, I think that's what the OP was looking for.
:)

Michael Wrote:
Hi Domenic
Wouldn't this do the same thing.

=PRODUCT(IF(A4:A9="Z",C4:C9,""))

If I don't ask, I don't learn

Regards
Michael Mitchelson



--
Domenic
------------------------------------------------------------------------
Domenic's Profile: http://www.excelforum.com/member.php...o&userid=10785
View this thread: http://www.excelforum.com/showthread...hreadid=394775


  #7   Report Post  
ericsh
 
Posts: n/a
Default


Thanks for your help guys, the Product function used as an array did the
trick.


--
ericsh
------------------------------------------------------------------------
ericsh's Profile: http://www.excelforum.com/member.php...o&userid=26149
View this thread: http://www.excelforum.com/showthread...hreadid=394775

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 Peter B Excel Worksheet Functions 1 March 7th 05 01:59 PM
sumproduct causing memory errors? dave Excel Worksheet Functions 1 March 3rd 05 09:31 AM
Can I reference =, <, or > sign in SUMPRODUCT BobT Excel Discussion (Misc queries) 7 February 16th 05 01:58 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 11:02 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"