+ Reply to Thread
Results 1 to 4 of 4

Count number of holidays

  1. #1
    Registered User
    Join Date
    02-10-2011
    Location
    Leeds
    MS-Off Ver
    Excel 2007
    Posts
    3

    Count number of holidays

    I have attached my spreadsheet with the info. I would like to know how I count how many holidays (H) each team has taken in the current month. But not sure how to do it??
    Attached Files Attached Files
    Last edited by tinybear77; 02-10-2011 at 12:42 PM.

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Count number of holidays

    What's a "Team" in this context, are they shown in column D?

    If so you could use a formula like this to get "Public" Team's holidays in Dec 2010

    =SUMPRODUCT((A2:A100=2010)*(B2:B100="Dec")*(D2:D100="Public")*(F2:O100="H"))

    You can replace 2010, "Dec", "Public" with cell references so you can easily change, e.g.

    =SUMPRODUCT((A2:A100=M2)*(B2:B100=N2)*(D2:D100=O2)*(F2:O100="H"))

    where year is in M2, month in N2 and Team in O2
    Audere est facere

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Count number of holidays

    Assuming that by "team" you mean department
    I put a unique list of departments from Q2 down. In R2
    =SUMPRODUCT(--($F$2:$O$100="H")*($D$2:$D$100=$Q2)*($B$2:$B$100=TEXT(TODAY(),"mmm")))
    You might want to divide this by 2 since you have two H's per day.
    Does that work for you?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,870

    Re: Count number of holidays

    See attached for one solution using =Countif(Range,Criteria)
    Attached Files Attached Files
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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