NBVAL on variable range

Solved
Taa66 Posted messages 2 Status Member -  
Taa66 Posted messages 2 Status Member -
Hello everyone

I need your help because I can't figure out how to solve my problem.
Basically, I have a schedule.
People are listed in rows and dates in columns.
If there is an "X", it means the person is working.

I want to count the number of working days per person from the beginning of May until today (A1), so my range will expand by one additional column every day.

Names of people from B3 to B10
Dates from 01/05/2022 to 30/05/2022 starting at C2.

Thank you in advance, hoping a solution exists.

Thanks everyone

3 answers

  1. PHILOU10120 Posted messages 6463 Registration date   Status Contributor Last intervention   835
     
    Hello

    A little example in the file

    The formula

    =COUNTIFS($C$2:$AG$2;"<="&$A$1;$C8:$AG8;"X")

    A1 = TODAY()
    C2:G2 the dates
    C8:AG8 the row with the Xs

    https://www.cjoint.com/c/LEmjWfqbHB4

    1
  2. dadout Posted messages 2570 Registration date   Status Member Last intervention   45
     
    Hello,

    you do a =COUNTIF(B4:B35,"x")

    so from B4 to B35 because there are 31 days in the month.

    Best regards
    0
  3. Taa66 Posted messages 2 Status Member
     
    Thank you very much PHILOU, that's exactly what I needed.
    Thank you for the quick response
    Thank you for the clarity
    0