+ Reply to Thread
Results 1 to 3 of 3

using COUNTIF to check against two conditions

Hybrid View

  1. #1
    Registered User
    Join Date
    07-03-2008
    Location
    Texas
    Posts
    1

    using COUNTIF to check against two conditions

    I have a spreadsheet (see attached) where I am using the COUNTIF function to let me know the number of times a persons name appears in each of three (3) columns. I also have a column showing the date and a column next to it showing the day of the week.

    The COUNTIF function is doing exactly what I want, but now I want to also be able to make another count against 2 different criteria:

    In addition to knowing the total number of times a name appears in a particular column I want to separately display the number of times a person's name appears only in those instances for which the day of the week happens to be a Saturday and/or Sunday.

    Thanks in advance for any advice on setting up a formula/function that does this.
    Attached Files Attached Files

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,792
    Do you only want to count for a specific shift? This formula in H9 will give you a count for Camacho day shifts at weekends

    =SUMPRODUCT((WEEKDAY($A3:$A33,2)>5)*($C3:$C33=H3))

    copy across for the same count for the other names

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Try:

    =SUMPRODUCT(($C$3:$C$33=H$3)*(WEEKDAY($A$3:$A$33,2)>=6))

    copied across
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1