I'm trying to compare my YTD sales figures with sales figures from the past few years. I'm trying to use the SUMIF function as follows:
=SUMIF(P$94:P$206,"<=" &TODAY()-1,S94:S206)
Where column P is dates and column s is sales. That works peachy keen for the current year. But when I try to adjust it for previous years, like:
=SUMIF(U$45:U$206,"DATE(YEAR(S209)-1,MONTH(S209),DAY(S209))",X45:X206)
where column U is dates, x is sales figures, and s209 is a cell showing todays date, minus one I'm getting zeros. I'm thinking formatting error, but I doubled checked and everything is mm/dd/yy. . . .
Maybe there's an easier way?
Bookmarks