Have an excel question. I am looking to see if something states "complete" in one cell and if yes then look at a date in another cell and then count how many are within 30 day period of today's date. Below I know its wrong but might be able to get a better idea of what I am trying to do.
=sumifs(Main!B:B="Completed",Main!H:H,"<30")
CodePudding user response:
You should be using COUNTIFS:
For 30 days window in the future:
=COUNTIFS(Main!B:B,"Completed",Main!I:I,">="&TODAY(),Main!I:I,"<"&TODAY() 30)
For 30 days window in the Past:
=COUNTIFS(Main!B:B,"Completed",Main!I:I,"<"&TODAY() 1,Main!I:I,">="&TODAY()-30)
CodePudding user response:
=COUNTIFS(Main!B:B,"Completed",Main!H:H,"<="&TODAY(),Main!H:H,"<"&TODAY() 30)