So for my work I am trying to make an Excel spreadsheet for my sales job. We get paid based on the number of closings in the month from previous sales, and our pay tier is based on the number of sales in the same month we get of closings. So I am trying to compare the date that we first spoke with a client to when we got the sale and add each one that matches in 1 formula. This formula is as close as I got and it only returns the 1 value =IF(AND(YEAR(B7:B25000)=YEAR(P7:P25000),MONTH(B7:B25000)=MONTH(P7:P25000)),1,0). I have tried adding SUM to it to see if that works and I feel like I am either doing it wrong i tried this =IF(SUM(AND(YEAR(B7:B25000)=YEAR(P7:P25000),MONTH(B7:B25000)=MONTH(P7:P25000)),1,0)). Can someone help me out with this?