Ryan Salmons
Ryan Salmons

Reputation: 1459

Excel sum value if month equals value

The function needs to iterate through the cells and if the value is the right month (8, 9, etc.), then it needs to add the value of another cell. All of my dates are within B3:B300, and all of my totals arew within K3:K300.

For example:

A1      A2       A3
8/8/14  8/10/14  9/10/14

B1      B2       B3
20      40       30

If I was looking for the sum for August, in this example it would be 60.

This is the formula I attempted, but didnt get the desired results:

=SUM(IF(--(MONTH('Transaction Financials'!B3:B300))=8,--('Transaction Financials'!K3:K300),0))

Upvotes: 0

Views: 1782

Answers (1)

shahkalpesh
shahkalpesh

Reputation: 33476

=SUMPRODUCT(--(MONTH(A2:A4) = 8), B2:B4)

Upvotes: 1

Related Questions