# Sum row based on start date, end date, and row header

#### droshan

##### New Member
I have the following data and am trying to find the sum based on the following inputs:

1. Start Date (e.g. Jan-17)
2. End Date (e.g. Mar-17)

What formula can I build that would be dynamic based on my three inputs and output the sum?

 Jan-17 Feb-17 Mar-17 Apr-17 May-17 Jun-17 Jul-17 Aug-17 Sep-17 Oct-17 Nov-17 Dec-17 A \$2,000 -\$780 -\$780 -\$780 -\$780 -\$780 -\$2,000 -\$2,000 -\$2,000 -\$2,000 -\$2,000 -\$2,000 B -\$300 -\$300 -\$300 -\$300 -\$300 -\$300 -\$300 -\$300 -\$300 -\$300 -\$300 -\$300 C -\$300 -\$300 -\$300 -\$300 -\$300 -\$300 -\$300 -\$300 -\$300 -\$300 -\$300 -\$300 D -\$50 -\$50 -\$50 -\$50 -\$50 -\$50 -\$50 -\$50 -\$50 -\$50 -\$50 -\$50 E -\$20 -\$20 -\$20 -\$20 -\$20 -\$20 -\$20 -\$20 -\$20 -\$20 -\$20 -\$20 F -\$117 -\$117 -\$117 -\$117 -\$117 -\$117 -\$117 -\$117 -\$117 -\$117 -\$117 -\$117 Total Costs \$1,214 -\$1,567 -\$1,567 -\$1,567 -\$1,567 -\$1,567 -\$2,787 -\$2,787 -\$2,787 -\$2,787 -\$2,787 -\$2,787

<colgroup><col><col span="12"></colgroup><tbody>
</tbody>

Thanks!

### Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

#### 63falcondude

##### Well-known Member
How's this?

Excel 2010
ABCDEFGHIJKLM
1Jan-17Feb-17Mar-17Apr-17May-17Jun-17Jul-17Aug-17Sep-17Oct-17Nov-17Dec-17
2A\$2,000.00-\$780.00-\$780.00-\$780.00-\$780.00-\$780.00-\$2,000.00-\$2,000.00-\$2,000.00-\$2,000.00-\$2,000.00-\$2,000.00
3B-\$300.00-\$300.00-\$300.00-\$300.00-\$300.00-\$300.00-\$300.00-\$300.00-\$300.00-\$300.00-\$300.00-\$300.00
4C-\$300.00-\$300.00-\$300.00-\$300.00-\$300.00-\$300.00-\$300.00-\$300.00-\$300.00-\$300.00-\$300.00-\$300.00
5D-\$50.00-\$50.00-\$50.00-\$50.00-\$50.00-\$50.00-\$50.00-\$50.00-\$50.00-\$50.00-\$50.00-\$50.00
6E-\$20.00-\$20.00-\$20.00-\$20.00-\$20.00-\$20.00-\$20.00-\$20.00-\$20.00-\$20.00-\$20.00-\$20.00
7F-\$117.00-\$117.00-\$117.00-\$117.00-\$117.00-\$117.00-\$117.00-\$117.00-\$117.00-\$117.00-\$117.00-\$117.00
8Total Costs\$1,214.00-\$1,567.00-\$1,567.00-\$1,567.00-\$1,567.00-\$1,567.00-\$2,787.00-\$2,787.00-\$2,787.00-\$2,787.00-\$2,787.00-\$2,787.00
9
10Start DateJan-17
11End DateMar-17
13Sum\$440.00
Sheet1
Cell Formulas
RangeFormula
B13=SUMPRODUCT((A2:A7=B12)*(B1:M1>=B10)*(B1:M1<=B11)*(B2:M7))

Perfect

Replies
1
Views
260
Replies
7
Views
835
Replies
1
Views
576
Replies
7
Views
416
Replies
6
Views
475

1,195,837
Messages
6,011,884
Members
441,651
Latest member
drewe2000

### 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.

### Which adblocker are you using?

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

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