• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Count except Sa and Su.

Belleke

Well-Known Member
Hi see the picture
I would like a formula that counts how many times 25, except saterday and sunday (Za, Zo)

Thanks
 

Attachments

  • Count_25.jpg
    Count_25.jpg
    79.5 KB · Views: 24
Not sure if the weekday names in row 2 are text or dates formatted as day names but this should help. Fill formula down as required

In case weekday are text:
=SUMPRODUCT((B$2:AF$2<>"Sa")*(B$2:AF$2<>"Su")*($B3:$AF3=25))

In case weekday are underlying dates:

=SUMPRODUCT((WEEKDAY(B$2:AF$2)<6)*($B3:$AF3=25))

Or if you have dates in row 1:

=SUMPRODUCT((WEEKDAY(B$1:AF$1)<6)*($B3:$AF3=25))

BR/Ajesh
 
I tested the formula of Grah Guido and is working fine.
A have another question for the same file.
I am looking for a formula that sums the values except Sa en Su.
Everybody thanks for thelp
 
Hi @Belleke,

It is actually not working. I should have evaluated my formula, but being so pleased it seemed to work - wanted to do a Bosco trick, I should know better then that - I kinda rushed to publish. I apologize.:oops:
It just worked because of the merged cells. So it only evaluates "za".

Please do use the given alternatives that are correctly working.

So for the sum use
=SOMMEN.ALS(B7:AF7;B$5:AF$5;"<>za";B$5:AF$5;"<>zo")
 
I tested the formula of Grah Guido and is working fine.
A have another question for the same file.
I am looking for a formula that sums the values except Sa en Su.
Everybody thanks for thelp

Small correction to the count formula above (Considering week start from Monday):

=SUMPRODUCT((WEEKDAY(B$1:AF$1,2)<6)*($B3:$AF3=25))

Now to sum values other than weekends:

=SUMPRODUCT((WEEKDAY(B$1:AF$1,2)<6)*($B3:$AF3=25)*($B3:$AF3))

BR/Ajesh
 
Back
Top