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

droshan

New Member
Joined
Dec 22, 2016
Messages
2
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)
3. Row Header (A)

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


[TABLE="width: 1127"]
<colgroup><col><col span="12"></colgroup><tbody>[TR]
[TD][/TD]
[TD="align: right"]Jan-17[/TD]
[TD="align: right"]Feb-17[/TD]
[TD="align: right"]Mar-17[/TD]
[TD="align: right"]Apr-17[/TD]
[TD="align: right"]May-17[/TD]
[TD="align: right"]Jun-17[/TD]
[TD="align: right"]Jul-17[/TD]
[TD="align: right"]Aug-17[/TD]
[TD="align: right"]Sep-17[/TD]
[TD="align: right"]Oct-17[/TD]
[TD="align: right"]Nov-17[/TD]
[TD="align: right"]Dec-17[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD="align: right"]$2,000[/TD]
[TD="align: right"]-$780[/TD]
[TD="align: right"]-$780[/TD]
[TD="align: right"]-$780[/TD]
[TD="align: right"]-$780[/TD]
[TD="align: right"]-$780[/TD]
[TD="align: right"]-$2,000[/TD]
[TD="align: right"]-$2,000[/TD]
[TD="align: right"]-$2,000[/TD]
[TD="align: right"]-$2,000[/TD]
[TD="align: right"]-$2,000[/TD]
[TD="align: right"]-$2,000[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD="align: right"]-$300[/TD]
[TD="align: right"]-$300[/TD]
[TD="align: right"]-$300[/TD]
[TD="align: right"]-$300[/TD]
[TD="align: right"]-$300[/TD]
[TD="align: right"]-$300[/TD]
[TD="align: right"]-$300[/TD]
[TD="align: right"]-$300[/TD]
[TD="align: right"]-$300[/TD]
[TD="align: right"]-$300[/TD]
[TD="align: right"]-$300[/TD]
[TD="align: right"]-$300[/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD="align: right"]-$300[/TD]
[TD="align: right"]-$300[/TD]
[TD="align: right"]-$300[/TD]
[TD="align: right"]-$300[/TD]
[TD="align: right"]-$300[/TD]
[TD="align: right"]-$300[/TD]
[TD="align: right"]-$300[/TD]
[TD="align: right"]-$300[/TD]
[TD="align: right"]-$300[/TD]
[TD="align: right"]-$300[/TD]
[TD="align: right"]-$300[/TD]
[TD="align: right"]-$300[/TD]
[/TR]
[TR]
[TD]D[/TD]
[TD="align: right"]-$50[/TD]
[TD="align: right"]-$50[/TD]
[TD="align: right"]-$50[/TD]
[TD="align: right"]-$50[/TD]
[TD="align: right"]-$50[/TD]
[TD="align: right"]-$50[/TD]
[TD="align: right"]-$50[/TD]
[TD="align: right"]-$50[/TD]
[TD="align: right"]-$50[/TD]
[TD="align: right"]-$50[/TD]
[TD="align: right"]-$50[/TD]
[TD="align: right"]-$50[/TD]
[/TR]
[TR]
[TD]E[/TD]
[TD="align: right"]-$20[/TD]
[TD="align: right"]-$20[/TD]
[TD="align: right"]-$20[/TD]
[TD="align: right"]-$20[/TD]
[TD="align: right"]-$20[/TD]
[TD="align: right"]-$20[/TD]
[TD="align: right"]-$20[/TD]
[TD="align: right"]-$20[/TD]
[TD="align: right"]-$20[/TD]
[TD="align: right"]-$20[/TD]
[TD="align: right"]-$20[/TD]
[TD="align: right"]-$20[/TD]
[/TR]
[TR]
[TD]F[/TD]
[TD="align: right"]-$117[/TD]
[TD="align: right"]-$117[/TD]
[TD="align: right"]-$117[/TD]
[TD="align: right"]-$117[/TD]
[TD="align: right"]-$117[/TD]
[TD="align: right"]-$117[/TD]
[TD="align: right"]-$117[/TD]
[TD="align: right"]-$117[/TD]
[TD="align: right"]-$117[/TD]
[TD="align: right"]-$117[/TD]
[TD="align: right"]-$117[/TD]
[TD="align: right"]-$117[/TD]
[/TR]
[TR]
[TD]Total Costs[/TD]
[TD="align: right"]$1,214[/TD]
[TD="align: right"]-$1,567[/TD]
[TD="align: right"]-$1,567[/TD]
[TD="align: right"]-$1,567[/TD]
[TD="align: right"]-$1,567[/TD]
[TD="align: right"]-$1,567[/TD]
[TD="align: right"]-$2,787[/TD]
[TD="align: right"]-$2,787[/TD]
[TD="align: right"]-$2,787[/TD]
[TD="align: right"]-$2,787[/TD]
[TD="align: right"]-$2,787[/TD]
[TD="align: right"]-$2,787[/TD]
[/TR]
</tbody>[/TABLE]


Thanks!
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
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
12Row HeaderA
13Sum$440.00
Sheet1
Cell Formulas
RangeFormula
B13=SUMPRODUCT((A2:A7=B12)*(B1:M1>=B10)*(B1:M1<=B11)*(B2:M7))
 
Upvote 0

Forum statistics

Threads
1,222,405
Messages
6,165,867
Members
451,989
Latest member
DannyBoy1977

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