=SUMPRODUCT(--(MONTH(Sheet1!A2:A20)=1),Sheet1!B2:B20)
or if the month is in a cell
=SUMPRODUCT(--(MONTH(Sheet1!A2:A20)=A2),Sheet1!B2:B20)
or if the dates could be multiple years, then put the 1st of the target
month in A2 and use
=SUMPRODUCT(--(Sheet1!A2:A20-DAY(Sheet1!A2:A20)+1=A2),Sheet1!B2:B20)
--
---
HTH
Bob
(change the xxxx to gmail if mailing direct)
"M A Rehman" wrote in message
...
Thank you.. but I am still facing a problem.. the data where I have it
reflecting as a date... how do I change it to reflect as the month ?
"galimi" wrote:
I have place an example at http://www.HelpExcel.com/examples
The name of the spreadsheet is db.xls
--
http://HelpExcel.com
"M A Rehman" wrote:
Hi,
I am trying to sum up a database which can be categorized under
different
months. The month is mentioned in on column A & the sum is in column B.
I would like the formula to be in a diff sheet so that whenever I make
changes in the main data, the same would get updated automatically.
Can someone please help me with this.
Regards,
M A Rehman