Could anybody tell me how to add values based on dates.

  • Thread starter Muhammad Nazim uddin
  • Start date
M

Muhammad Nazim uddin

I want to get the sum of a particular month E.G. 1 Jan 07 to 31 Jan 07 from 6
months data?
 
T

Toppers

Assuming there is only January for ONE year then try:

=SUMPRODUCT(--(MONTH(A1:A100)=1)*(B1:B100))

Where A1:A100 are your dates (cells formatted as DATE) and B1:B100 is the
data to be summated.

If there are multiple years:

=SUMPRODUCT(--(MONTH(A1:A100)=1),--(YEAR(A1:A100)=2007)*(B1:B100))


HTH
 
Top