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.
 

Some videos you may like

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

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,192
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.
 

Watch MrExcel Video

Forum statistics

Threads
1,109,426
Messages
5,528,690
Members
409,830
Latest member
KT50

This Week's Hot Topics

  • Change military grades into rank
    Afternoon all Need help with formula that will change military rank (i.e. 1, 2, 3 into Amn, A1C, SrA). Running IF formula that does not work...
  • VBA COUNTIF SOLUTION
    Hi The following are the errors spread across the several columns from E to Q ie. 13 columns across several sheets with more than 500 rows per...
  • INSERT ROW WITH SPECIFIS TEXT IN A COLUMN
    Hi All! How can identify that that the row to be inserted has to be inserted before 1st row with specific text in column F. If I record the...
  • Auto-Create a monthly Sign in sheet for preschool students
    The image below is what each page looks like. Above is space for the "Child Name" "Month" "Class" School days are obviously Monday-Friday but...
  • VBA vlookup multiple results
    Hi folks, Hopefully someone out there can help. I have a list to vlookup which works (ish). the lookup only picks up the first instance of the...
  • Extract values for earliest/latest times
    I am trying to put together a formula to get the earliest start time, the latest end time from column A for each person in Column B-F without the...
Top