Two conditional IF statement using Month function
I am trying to write a two conditional IF statement that sums up values in column C if for example column A = January and column B = category x. The result would be January sales for category x after querying a large spreadsheet of sales data.
Right now I'm using the following formula:
=SUMPRODUCT(--(MONTH('raw data'!$B$2:$B$18266= 2),--(('raw data'!$H$2:$H$18266) ="Acme"),'raw data'!$O$2:$O$18266)
For some reason, the month function doesn't seem to be working as I get the same answer regardless of what month I'm looking for. Theoretically, if the month is "2" it should return a 1, if the category is "Acme" it should return a 1 which would then multiply 1x1xraw data sales value. If either of the first two conditions are not true, they would give a zero which would return a zero for the full product.
Any thoughts on why the month function isn't working? Maybe the array?
Thanks!