Jason Lucas
Jason Lucas

Reputation: 113

Easy Excel Formula

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")

Upvotes: 0

Views: 125

Answers (2)

Jason Lucas
Jason Lucas

Reputation: 113

=COUNTIFS(Main!B:B,"Completed",Main!H:H,"<="&TODAY(),Main!H:H,"<"&TODAY()+30)

Upvotes: 0

Scott Craner
Scott Craner

Reputation: 152660

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)

Upvotes: 3

Related Questions