SOLVED

Counting weeks after today

Copper Contributor

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

ReadTheIron_1-1719339828044.png

 

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

@ReadTheIron 

Please give it a try:

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

 

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

1 best response

Accepted Solutions
best response confirmed by HansVogelaar (MVP)
Solution

@ReadTheIron 

Please give it a try:

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

 

View solution in original post