Jimmy
Jimmy

Reputation: 12487

Excel sum amounts if date falls within a specific month

I'm trying to create a formula (not pivot) in excel to do the following:

Check what payments were made within a given month (say in this case, January) and then total up the amounts which are under type A. Here is a data example:

| Date       | Amount | Type |
|------------|--------|------|
| 01/01/2015 |    £10 | A    |
| 05/03/2015 |    £20 | B    |
| 17/01/2015 |     £5 | A    |
| 07/01/2015 |    £25 | B    |

Here is the closest I have been able to get/find:

=SUMIF(A1:A10,"MONTH(A1:A10)=1",B1:B10)

The expected output should be: £15 - however I just get 0

Can anyone tell me if this is even possible without having to resort to pivot tables or VBA?

Upvotes: 2

Views: 280

Answers (1)

user4039065
user4039065

Reputation:

Try providing a start and stop date to the SUMIFS function.

=sumifs(B:B, C:C, "A", A:A, ">="&date(2015, 1, 1), A:A, "<"&date(2015, 2, 1))

Upvotes: 2

Related Questions