Filtering a Matrix w/ a Vector and Summing/Counting Values in a Column

u8366

New Member
Joined
Mar 6, 2014
Messages
5
Seeking your help to determine an array formula that will filter the values in the first column of a table (multiple rows and columns) with the values in an array and summing or counting specific values in a column of the remaining unfiltered rows.

The data table consists of the following on one tab in the workbook and is a named range, Person_Lookup

NameWeightCertification
Ann120No
Bill180Yes
Carl160Yes
Jose140No
Mary140No
Nancy135Yes
Rick175No

<tbody>
</tbody>














The array value is on another tab, it's a named range and will typically include blank values, Current_Friends.

Ann
Carl
Jose
Rick
blank
blank
blank
...
blank

I'd like an array formula that can sum the weight of the friends listed in the array and another that can count the number of friends with certification.

Is this possible? Thanx a bunch for your insight and experience.
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Hi and welcome to Mr Excel Forum

Maybe...

1. Sum of the weights
=SUMPRODUCT(SUMIF(INDEX(Person_Lookup,0,1),Current_Friends,INDEX(Person_Lookup,0,2)))

2. Count with certification (Excel 2007 or higher)
=SUMPRODUCT(COUNTIFS(INDEX(Person_Lookup,0,1),Current_Friends,INDEX(Person_Lookup,0,3),"Yes"))

Hope this helps

M.
 
Upvote 0
Thanx for the prompt response Marcelo. I get a #REF! error when translating this to my need and entering it as an array formula. I don't understand the 0 as the row reference in the INDEX functions.

..... Rick
 
Upvote 0
Thanx for the prompt response Marcelo. I get a #REF! error when translating this to my need and entering it as an array formula. I don't understand the 0 as the row reference in the INDEX functions.

..... Rick

You don't need to confirm the formulas with Ctrl+Shift+Enter

A 0 (zero) as the row reference means all rows - see the help file.

So
INDEX(Person_Lookup,0,1)
returns an array of values corresponding to all rows of the first column (3rd argument = 1) of the named range Person_Lookup.

I tested both formulas and they worked perfectly for me.

M.
 
Upvote 0
Rick,

Please, check the scope of the named ranges.

Both must have Scope = Workbook

M.
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,730
Members
448,987
Latest member
marion_davis

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top