The simple answer is to use the SUMIF() function
If your dates are in the range A2 to A21
and the values are in B2 to B21
Then to get the sum of all values for say 04-Aug-2009
enter this formula in any empty cell:
The date to lookup can be in a different cell, rather than hardcoded into the formula.
If the date is in Cell C2, this formula in D2 will work
Note the $ signs. These are required if you are going to extend or drag the formula, as discussed below.
Using this approach you can put a series of dates in column C and then drag the formula in D2 down. It will use the series of dates and return the relevant totals.
A B C D
1 Dates Values Date to sum Sum
2 4-Aug-09 10 1-Aug-09 0
3 4-Aug-09 11 2-Aug-09 41
4 4-Aug-09 13 3-Aug-09 0
5 6-Aug-09 13 4-Aug-09 65
6 11-Aug-09 12 5-Aug-09 0
7 4-Aug-09 14 6-Aug-09 13
8 4-Aug-09 17 7-Aug-09 0
9 29-Jul-09 19
10 29-Jul-09 20
11 2-Aug-09 17
12 2-Aug-09 10
13 2-Aug-09 14
14 31-Jul-09 16
15 10-Aug-09 19
16 14-Aug-09 10
17 11-Aug-09 20
18 26-Jul-09 10
19 10-Aug-09 10
20 30-Jul-09 11
21 27-Jul-09 15
Note that all dates should be in a format that Excel recognizes. If you can change the way that a date is displayed by changing the date format, then Excel has recognized the entry in the cell as a date.
Format C2 as "dd-mm-yy" will show 04-08-09
and "dd-mmmm-yyyy" will show 04-August-2009
Your next issue will be how to keep this working as dates in column A change.
How do these dates get entered, and are they always within a range, such as a single month or the last 30 days.