0
votes

I have a table with two columns: Date and Cost. The date is formatted in "XX/XX/XXXX". The cost is just a number value.

I have a second table where I have the dates listed out in month ("January", "February", "March"...) in columns. What I would like to achieve is to do a SUMIF formula where the date matches the month in column. This is what I have tried so far:

=SUMIF(B:B,TEXT(A:A,"MMMM"),D1)

In this case B:B = Cost , A:A = Date, D1 = "January". However this didn't work.

Can you please advise.

Thank you

1
The answer would heavily depend on your data types. Are your values actual dates formatted? Or text values? In both tablesJvdV
@JvdV The A Column of "Date" is date formatted as mentioned (XX/XX/XXXX e.g. 11/09/2019). The D1 field is a text (/general) value of "January" as an example.Revokez

1 Answers

0
votes

It seems that B:B is your summing range, in that case,

Try

=SUMIF(TEXT(A:A,"MMMM"),D1,B:B)

Syntax for SUMIF: SUMIF(range, criteria, [sum_range])

or

=SUMIFS(B:B,TEXT(A:A,"MMMM"),D1)

Syntax for SUMIF: SUMIFS(sum_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)