# Add Up Rows dependant on cells

#### lotsbg

##### Board Regular
I have a problem that I would most appeciate getting answered. Any help would be greatly appreaciated.

As shown on the attached picture, I have various rows and dates up the top. In cells Basically in Cells C2 and C3 (not shown ) I have the start and end date.

Basically I was a column (Column T) that will sum the row if the numbers fall within the start and end date. So for example, if the start date was Apr-06 and the end Date was Jun-O6, then cell T9 would equal 7124.97 + 5540.70+3663.43. And would automatically change when you change the start and finish dates in cells C2 C3.

Any help would be greatly appreciated. Thanks!

### Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Try eg:

Code:
``=SUMPRODUCT(--(MONTH(\$L\$5:\$S\$5)>=MONTH(\$C\$2)),--(MONTH(\$L\$5:\$S\$5)<=MONTH(\$C\$3)),\$L9:\$S9)``

Expand the ranges to suit, but make sure they all have the same number of columns.

Man you are a legend. Thanks heaps! Problem solved

lotsbg

To show your sheet on the borad, I suggest that you use the provided HTML Maker in future. To do so, see the link at the bottom of this page to Colo's HTML Maker. Also read the ‘Sticky’ titled: 'HTML Maker FAQ (How to show your sheet on the board)' which is at the top of this ‘Excel Questions’ forum. Test it out in the ‘Test Here’ forum which is found in the ‘MrExcel Message Board Forum Index’ before trying to use it in this forum.

Another approach to your current question would be as shown below. I have compressed the data to show it more easily on the board and have put my result in cell M3. The formula is:
=SUMIF(E1:K1,">="&C2,E3:K3)-SUMIF(E1:K1,">"&C3,E3:K3)

Once again, you would have to adjust ranges in the formula to suit your data.
Mr Excel.xls
BCDEFGHIJKLM
1Feb-06Mar-06Apr-06May-06Jun-06Jul-06Aug-06
2StartApr-06
3EndJun-06123456712
4
Sheet1

Replies
8
Views
227
Replies
8
Views
148
Replies
10
Views
371
Replies
6
Views
607
Replies
0
Views
166

1,196,447
Messages
6,015,318
Members
441,888
Latest member
birexual

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