SOLVED

Counting weeks after today

Copper Contributor

Counting weeks after today

I have a project management calendar where I want to count the number of weeks per project scheduled after today:

I can find the week number for today: =WEEKNUM(TODAY(),2) Result: 26

And I can count the number of weeks after any given integer: =COUNTIF(G1:AF1,">=26") Result: 14

And I can count the number of scheduled weeks after a given integer: =COUNTIFS(G1:AF1, ">=26",G4:AF4,">0") Result: 2

But when I try to replace the integer in that formula with the formula for the week number, I get zero: =COUNTIFS(G1:AF1, ">=WEEKNUM(TODAY(),2)",G4:AF4,">0")

What am I missing here? Many thanks for any help.

2 Replies
best response confirmed by HansVogelaar (MVP)
Solution

Re: Counting weeks after today

Please give it a try:

``=COUNTIFS(G1:AF1, ">="&WEEKNUM(TODAY(),2),G4:AF4,">0")``

Re: Counting weeks after today

@dscheikey That did it! I learned something today - thank you!

1 best response

Accepted Solutions
best response confirmed by HansVogelaar (MVP)
Solution

Re: Counting weeks after today

Please give it a try:

``=COUNTIFS(G1:AF1, ">="&WEEKNUM(TODAY(),2),G4:AF4,">0")``