Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Ben010
 
Posts: n/a
Default Product of 2 arrays based on criteria

I want to do a SUMPRODUCT of 2 arrays but only if the elements in the array
meet a criteria established by a thrid array. For example, consider the
three arrays, where the top array is names, the second array is salary and
the third is a percentage:
Amy Sam Tim Bob Tim Amy Bob
200 300 100 300 100 200 300
.4 .3 .2 .2 .1 .1 .5
I want to be able to end up with a sumproduct associated with each name.
Thus IF "Amy" SUMPRODUCT=100, IF "Tim" SUMPRODUCT=210 and so on.

  #2   Report Post  
Posted to microsoft.public.excel.misc
Toppers
 
Posts: n/a
Default Product of 2 arrays based on criteria

Ben,

Assuming data in your example is in rows 1 to 3, colums A to G

=SUMPRODUCT(--($A$1:$G$1="Amy"),--($A$2:$G$2),--($A$3:$G$3))

HTH

"Ben010" wrote:

I want to do a SUMPRODUCT of 2 arrays but only if the elements in the array
meet a criteria established by a thrid array. For example, consider the
three arrays, where the top array is names, the second array is salary and
the third is a percentage:
Amy Sam Tim Bob Tim Amy Bob
200 300 100 300 100 200 300
.4 .3 .2 .2 .1 .1 .5
I want to be able to end up with a sumproduct associated with each name.
Thus IF "Amy" SUMPRODUCT=100, IF "Tim" SUMPRODUCT=210 and so on.

  #3   Report Post  
Posted to microsoft.public.excel.misc
Ben010
 
Posts: n/a
Default Product of 2 arrays based on criteria

Toppers--
Thats excellent. One more for you: How do I sumproduct everyone except Amy
and Bob? Thats is, all people not equal to Amy or Bob?

Ben

"Toppers" wrote:

Ben,

Assuming data in your example is in rows 1 to 3, colums A to G

=SUMPRODUCT(--($A$1:$G$1="Amy"),--($A$2:$G$2),--($A$3:$G$3))

HTH

"Ben010" wrote:

I want to do a SUMPRODUCT of 2 arrays but only if the elements in the array
meet a criteria established by a thrid array. For example, consider the
three arrays, where the top array is names, the second array is salary and
the third is a percentage:
Amy Sam Tim Bob Tim Amy Bob
200 300 100 300 100 200 300
.4 .3 .2 .2 .1 .1 .5
I want to be able to end up with a sumproduct associated with each name.
Thus IF "Amy" SUMPRODUCT=100, IF "Tim" SUMPRODUCT=210 and so on.

  #4   Report Post  
Posted to microsoft.public.excel.misc
Toppers
 
Posts: n/a
Default Product of 2 arrays based on criteria

One way:

=SUMPRODUCT(--($A$1:$G$1<"Amy"),--($A$1:$G$1<"Bob"),--($A$2:$G$2),--($A$3:$G$3))

"Ben010" wrote:

Toppers--
Thats excellent. One more for you: How do I sumproduct everyone except Amy
and Bob? Thats is, all people not equal to Amy or Bob?

Ben

"Toppers" wrote:

Ben,

Assuming data in your example is in rows 1 to 3, colums A to G

=SUMPRODUCT(--($A$1:$G$1="Amy"),--($A$2:$G$2),--($A$3:$G$3))

HTH

"Ben010" wrote:

I want to do a SUMPRODUCT of 2 arrays but only if the elements in the array
meet a criteria established by a thrid array. For example, consider the
three arrays, where the top array is names, the second array is salary and
the third is a percentage:
Amy Sam Tim Bob Tim Amy Bob
200 300 100 300 100 200 300
.4 .3 .2 .2 .1 .1 .5
I want to be able to end up with a sumproduct associated with each name.
Thus IF "Amy" SUMPRODUCT=100, IF "Tim" SUMPRODUCT=210 and so on.

  #5   Report Post  
Posted to microsoft.public.excel.misc
Ben010
 
Posts: n/a
Default Product of 2 arrays based on criteria

Outstanding. I appreciate your help.

"Toppers" wrote:

One way:

=SUMPRODUCT(--($A$1:$G$1<"Amy"),--($A$1:$G$1<"Bob"),--($A$2:$G$2),--($A$3:$G$3))

"Ben010" wrote:

Toppers--
Thats excellent. One more for you: How do I sumproduct everyone except Amy
and Bob? Thats is, all people not equal to Amy or Bob?

Ben

"Toppers" wrote:

Ben,

Assuming data in your example is in rows 1 to 3, colums A to G

=SUMPRODUCT(--($A$1:$G$1="Amy"),--($A$2:$G$2),--($A$3:$G$3))

HTH

"Ben010" wrote:

I want to do a SUMPRODUCT of 2 arrays but only if the elements in the array
meet a criteria established by a thrid array. For example, consider the
three arrays, where the top array is names, the second array is salary and
the third is a percentage:
Amy Sam Tim Bob Tim Amy Bob
200 300 100 300 100 200 300
.4 .3 .2 .2 .1 .1 .5
I want to be able to end up with a sumproduct associated with each name.
Thus IF "Amy" SUMPRODUCT=100, IF "Tim" SUMPRODUCT=210 and so on.

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
how to count unique values in excel based on multiple criteria IDBUGM Excel Worksheet Functions 3 March 15th 06 04:00 PM
caluculate an average based on 2 criteria [email protected] Excel Discussion (Misc queries) 3 November 3rd 05 03:34 AM
Locate a Cell based upon criteria Stan Excel Discussion (Misc queries) 1 September 23rd 05 03:05 PM
SUMIF in multiple columns based on other criteria in Excel? Scott Powell Excel Discussion (Misc queries) 9 April 13th 05 02:32 PM
Which Function(s) do I use? LB Excel Worksheet Functions 3 January 6th 05 02:53 AM


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

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"