Sum a date range using Index Match for multiple column variables

stephenpoff

New Member
Joined
Feb 24, 2020
Messages
5
Office Version
  1. 2010
Platform
  1. Windows
Hi,

I have a range of data, with dates in column A, and columns of prices based on 4 possible variables. I'm trying to sum the price data, based on a date range for a selected variable using the below INDEX/MATCH formula

=SUMIFS(INDEX(Data!$O$3:$R$10001,MATCH(E11,Data!$A$3:$A$10001,0),MATCH(B11,Data!$G$2:$J$2,0))

Where:
- Data!$O$3:$R$10001 = price per day for each variable
- Data!$A$3:$A$10001 = dates (matched based on what date is in cell E11)
- Data!$G$2:$J$2 = variable 1-4 (matched based on what variable is in cell B11)

I am trying to change the date look up to sum if within a range (between two dates), rather than just return one value based on one date

Any help?
Thanks
 

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.
hi,
please post a small sample of your data just like so:
1234
02/25/2020 $ 618.72 $ 753.61 $ 663.96 $ 879.79
02/26/2020 $ 423.64 $ 400.07 $ 691.83 $ 811.28
02/27/2020 $ 595.14 $ 847.71 $ 137.28 $ 621.51
02/28/2020 $ 769.22 $ 129.18 $ 761.73 $ 319.86
02/29/2020 $ 595.14 $ 400.07 $ 691.83 $ 879.79
 
Upvote 0
Below is a snip of the data table:

1582595536182.png


And, I'm trying to find (from the below picture) the following: Max Benefit Payable = Sum of column variable A for date range B in the above table. I don't necessarily need to use the formula in the forum post - just some way to sum for a data range, depending on a variable column
1582595671574.png
 
Upvote 0
Maybe something along the following:
Mrexcel.xlsx
ABCDE
11234
202/25/2020 $ 618.72 $ 753.61 $ 663.96 $ 879.79
302/26/2020 $ 423.64 $ 400.07 $ 691.83 $ 811.28
402/27/2020 $ 595.14 $ 847.71 $ 137.28 $ 621.51
502/28/2020 $ 769.22 $ 129.18 $ 761.73 $ 319.86
602/29/2020 $ 595.14 $ 400.07 $ 691.83 $ 879.79
7
8
9
10
11from02/25/2020
12to02/26/2020
13for1
14sum $ 1,042.36
stephenpoff
Cell Formulas
RangeFormula
B14B14=SUM(IF($B$1:$E$1=$B$13,IF($A$2:$A$6>=$B$11,IF($A$2:$A$6<=$B$12,$B$2:$E$6))))
 
Upvote 0
Thanks for your help - it is returning zero though, when I try that in my example (below) - what have I got wrong?

1582597395731.png
 
Upvote 0
Please verify that your dates are dates, no trailing space after the values in row 1 and that your amounts are not texts.
and adjust references so it will catch up the new criteria when copying down:
=SUM(IF($B$1:$E$1=$A11,IF($A$2:$A$6>=$B11,IF($A$2:$A$6<=$C11,$B$2:$E$6))))
 
Upvote 0
Yes - checked all that (changed the dates to New Zealand to match my version). Have also tried it with different column labels as well
 
Upvote 0
  1. In any blank cell, type the value 1.
  2. Make sure the cell in which you typed 1 is formatted as a number.
  3. Select the cell with the 1 and Copy.
  4. Select the range A1 to E6 .
  5. Choose Paste Special.
  6. Under Operation , click Multiply and then click OK.
 
Upvote 0

Forum statistics

Threads
1,214,942
Messages
6,122,367
Members
449,080
Latest member
Armadillos

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