+ Reply to Thread
Results 1 to 3 of 3

Countifs issue!

  1. #1
    Registered User
    Join Date
    06-24-2014
    Location
    South Wales
    MS-Off Ver
    2010
    Posts
    27

    Countifs issue!

    I have attached my spreadsheet, so you will know what I am on about! This spreadsheet has been a very trying project for me; I think this is the 3rd time I have had to come to the forum!!! My boss has a lot to answer for LOL!

    I am trying to get a total of people supported in a set period. In cell E67 I want the number of people supported in that week (dates are shown in D67, but the actual dates come from Sheet 2, A17 to B17). I need to take into account that service users have start and end dates (D13:D21 and E13:E21). So if someone doesn't start support till week 2 (shown in cell D13:D21), I don't want them included in the count for week 1; but also, if they end in week 1 (shown in cell E13:E21), I don't want them counted in week 2, etc., etc.

    Hope this makes sense, if not please let me know!

    Many thanks in advance!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Countifs issue!

    None of your example data fits with the example though? ie none of the Start/End Dates fall within the ranges youre looking at
    If someone has helped you then please add to their Reputation

  3. #3
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: Countifs issue!

    Hi -

    I think I get what you mean.

    I used SUMPRODUCT to check if the start date is less than or equal to the date range you are searching and if the end date is greater than or equal to the date range. The formula ignores anyone who doesn't have an end date (Cells E13 through E21). So I put some fake data into some of those cells to verify they work. The formula in Cell C67 looks like:

    =SUMPRODUCT(--(($D$13:$D$21)<=Sheet2!A17)*--(('4 weekly service user schedule'!$E$13:$E$21)>=Sheet2!B17))

    I have attached a copy of your spreadsheet with this formula in place. See if this works for you.

    Please note I changed the format on your dates to US for my convenience. You should be able to copy the formulas into your spreadsheet and they should work the same.
    Attached Files Attached Files
    ____________________________________________
    If this has solved your problem, please edit the thread title to add the word [SOLVED] at the beginning. You can do this by
    -Go to the top of the first post
    -Select Thread Tools
    -Select Mark thread as Solved

    If I have been particularly helpful, please "bump" my reputation by pressing the small star in the lower left corner of my post.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. COUNTIFS issue
    By Fletch161 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-29-2015, 10:51 AM
  2. [SOLVED] Issue with countifs
    By grkchakri in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-21-2015, 01:13 AM
  3. [SOLVED] Issue with countifs function
    By grkchakri in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-21-2014, 12:19 PM
  4. [SOLVED] COUNTIFS Issue
    By hegleg88 in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 05-29-2014, 02:24 AM
  5. COUNTIFS issue
    By Glen- in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-11-2014, 08:29 PM
  6. COUNTIFS - Time Issue
    By kjcdude in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-24-2013, 06:48 PM
  7. [SOLVED] Sumproduct as Countifs issue
    By jake.masters in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-12-2012, 10:49 AM

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