Sum if Between Dates and in the list

p9j123

Active Member
Joined
Apr 15, 2014
Messages
288
Office Version
  1. 2013
Platform
  1. Windows
Can someone help me with a formula for with the following requirements?

On Sheet 1, sum Column H if Column A is between Start Date and End Date, and if Column B is any of the list in Sheet 2 Column A.


Sheet2 (Column A

Red
Blue
Green
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Here is one idea:
MrExcel_20220805.xlsx
ABHIJK
1DateSheet2 CodeAmtStart Date1/16/2022
21/15/2022Red1End Date2/21/2022
31/23/2022Blue2Sum11
41/30/2022Purple3
51/17/2022Green9
63/13/2022Purple8
72/22/2022Red7
Sheet1
Cell Formulas
RangeFormula
K3K3=SUMPRODUCT((B2:B7=TRANSPOSE(Sheet2!A1:A3))*(A2:A7>=K1)*(A2:A7<=K2)*(H2:H7))

MrExcel_20220805.xlsx
A
1Red
2Blue
3Green
Sheet2
 
Upvote 0
Thank you so much, should I run it with CTRL+SHIFT+ENTER? or just [ENTER]?
 
Upvote 0
Try just Enter and see if SUMPRODUCT handles the arrays… if no result, go back into the formula bar, hit F2, then Ctrl-Shift-Enter.
 
Upvote 0
T202208a.xlsm
ABHIJK
1DateCodeAmountStart Date16-Jan-2022
215-Jan-2022Red1End Date21-Feb-2022
323-Jan-2022Blue2Sum11
430-Jan-2022Purple3
517-Jan-2022Green9
613-Mar-2022Purple8
722-Feb-2022Red7
2c
Cell Formulas
RangeFormula
K3K3=SUMPRODUCT(--(ISNUMBER(MATCH(B2:B7,Sheet2!A1:A3,0))),--(A2:A7>=K1),--(A2:A7<=K2),H2:H7)
 
Upvote 0

Forum statistics

Threads
1,214,936
Messages
6,122,340
Members
449,079
Latest member
rocketslinger

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