Automatically change the result

randomwalker

Board Regular
Joined
Feb 22, 2007
Messages
169
Hi,

From cell A1 to A30, I input dates from 2011-1-1 to 2011-1-30; From cell B1 to B30, I input numbers, such as 55, 37, .... totally, there are 30 numbers.

In cell C1, I input 2011-1-1, in cell C2, I input 2011-1-12. In cell C3, I want to have a formula to sum up the number from cell b1 to b12. How to write that formula so that the result in C3 change automatically if I change the date in cell c2?

Hopefully, I have made myself clearly enough.

Thanks for help!!!
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Try this;

Code:
=SUMPRODUCT(($A$1:$A$31 >= C1)*($A$1:$A$31 <= C2)*($B$1:$B$31))

I have used 31 days, but adjust to suit.

HTH
Colin
 
Upvote 0

Forum statistics

Threads
1,224,517
Messages
6,179,239
Members
452,898
Latest member
Capolavoro009

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