Add Up Rows dependant on cells

lotsbg

Board Regular
Joined
Mar 8, 2004
Messages
110
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.jpg
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
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.
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,214,948
Messages
6,122,420
Members
449,083
Latest member
Ava19

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