Complex Array Formula Needed

pliskers

Active Member
Joined
Sep 26, 2002
Messages
461
Office Version
  1. 2016
Platform
  1. Windows
I have a list of items on Sheet 1 (column A), and a data table on Sheet 2 with item names in col A and values in col B.

I'd like an array formula that would deliver, in a single cell, the total of all records in column B on Sheet 2 that match ANY of the items in my list in col A Sheet 1.

I think I've described this clearly enough to hopefully not have to provide a data sample. Would greatly appreciate a sample formula. Many thanks!
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Excel Workbook
AB
1ItemSum
2abc988
3cde931
4fff869
5ggg1345
Sheet1
Excel 2007
Cell Formulas
RangeFormula
B2=SUMIF(Sheet2!A:A,Sheet1!A2,Sheet2!B:B)
 
Upvote 0
I'd like an array formula that would deliver, in a single cell, the total of all records in column B on Sheet 2 that match ANY of the items in my list in col A Sheet 1.

Jeff, When you write "total of all records in column B", do you want the Total Sum or the Total Count of matching rows?

If you want Sum, then you can use this Sumproduct formula to calculate that sum in one cell....

=SUMPRODUCT(--(ISNUMBER(MATCH(Sheet2!$A$2:$A$100,Sheet1!A:A,0))),Sheet2!$B$2:$B$100)

Adjust the number of rows for the range in Sheet2 to match your range size.
 
Upvote 0

Forum statistics

Threads
1,214,932
Messages
6,122,331
Members
449,077
Latest member
jmsotelo

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