Complex Array Formula Needed

pliskers

Active Member
Joined
Sep 26, 2002
Messages
395
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!
 

Some videos you may like

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

jim may

Well-known Member
Joined
Jul 4, 2004
Messages
7,478
Excel Workbook
AB
1ItemSum
2abc988
3cde931
4fff869
5ggg1345
Sheet1
Excel 2007
Cell Formulas
RangeFormula
B2=SUMIF(Sheet2!A:A,Sheet1!A2,Sheet2!B:B)
 

Jerry Sullivan

MrExcel MVP
Joined
Mar 18, 2010
Messages
8,787
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.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,494
Messages
5,596,486
Members
414,070
Latest member
DuncanLucas

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
Top