Sum Values in column if Left 3 in another column are specified, and values in a different column are in a specified named range

dc2784

New Member
Joined
Mar 21, 2019
Messages
3
Hi All,

I have a large set of data (example below). I would like to Sum the values in column A, if the date is a specific date, if the LEFT 3 values in column B is "200", AND if the value in column C is in a specified named range (name: Include). Not all the data is unique which is fine. I can get it to work if I add a seperate column =LEFT(....), but I want to get it so there is no extra columns.

A B C D
23 406EFC 832 1/03/2019
23 406CCC 832 1/03/2019
85 200EFC 862 1/03/2019
42 200EDA 804 2/03/2019
67 406EFD 834 2/03/2019

I've experimented with SUMPRODUCT(--(LEFT('DATA'!B:B,3)="200")*--('DATA'!D:D='Date'!A1),'DATA'!A:A)
But I can't get the named range to fit into the formula and work.
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

dc2784

New Member
Joined
Mar 21, 2019
Messages
3
It's in G2:G6 and has a 3 values in column C that I want to include (e.g. 804, 862, 834).
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,210
Whole column references are expensive. Try to change the following for the definite ranges.

=SUMPRODUCT('DATA'!A:A,--(LEFT('DATA'!B:B,3)="200"),--ISNUMBER(MATCH(LEFT('DATA'!C:C,3),Include&"",0)),--('DATA'!D:D='Date'!A1))

assuming that G2:G6 is named Include and Include contains values/items like 804, 862,etc.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,652
Messages
5,838,597
Members
430,557
Latest member
MK15

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