+ Reply to Thread
Results 1 to 4 of 4

CountIfs multiple dates in multiple ranges

  1. #1
    Registered User
    Join Date
    10-13-2012
    Location
    Toronto
    MS-Off Ver
    Excel 2003
    Posts
    2

    CountIfs multiple dates in multiple ranges

    I need a formula that can calculate this for period ending every month
    I started on rehire dashboard but I am missing the part to exclude the N/A

    eg. For stats eff: March 31, 2018
    I sort Col E (Contract End Date) for end dates greater than March 31, 2018 and dates N/A
    then sort by col D (Rehire Date) for rehire dates earlier than March 31, 2018 (exclude N/A)
    Then sort by LOB (Line of Business)

    Appreciate any help

    I attach a spreadsheet
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,955

    Re: CountIfs multiple dates in multiple ranges

    Welcome to the forum.

    I am not clear what the issue is here. Is it simply how to get rid of #N/A errors, or is there more to it? I have looked at the workbook and you seem to have formulae in place - if they are not working as expected, you need to give us some idea of the results you are expecting and why.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    10-13-2012
    Location
    Toronto
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: CountIfs multiple dates in multiple ranges

    Hi Thank you for your response.

    I'll try to be more clear in the example below.
    There could be N/A in each column. The only one that count are if they are in column Ends & col Start
    date falls in the parameters (ie. before March 2018). If the N/A appears in Starts and the date in End
    is within the parameter (ie. greater than March 2018) then I do not want to count it.

    Start Ends LOB
    12-1-16 4-1-20 Nuclear - Count as 1 Started before March 2018 and ends after March 2018
    6-1-14 5-1-16 N/A - Does not count as ends before March 2018
    7-1-18 9-1-22 Corporate - Count as 1
    9-1-15 N/A Nuclear - Count as Start date is before March 2018 and there is no end date
    10-1-18 9-1-17 Enterprise - Does not count as Ends prior to March 2018
    N/A 5-1-14 N/A - Does not count as Ends prior to March 2018
    N/A N/A N/A - Do not count LOB as there is not start or end date

    I hope this is clearer. I appreciate your help

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,570

    Re: CountIfs multiple dates in multiple ranges

    Still not sure that I understand the issue as I didn't find any instances where N/A was in column D and a date was listed in column E or visa versa.
    I made the following changes:
    1. On the first sheet in column F found and replaced #N/A with N/A
    2. Replace text in dashboard row 22 with first dates of each month custom formatted mmm yyy
    3. Rows 23:26 are populated using: =COUNTIFS('Subject to the Rehire Procedure'!$E:$E,">="&EOMONTH(B$22,0)+1,'Subject to the Rehire Procedure'!$D:$D,"<="&EOMONTH(B$22,0),'Subject to the Rehire Procedure'!$F:$F,$A23)
    4. Row 27 is populated using: =COUNTIFS('Subject to the Rehire Procedure'!$E:$E,">="&EOMONTH(B$22,0)+1,'Subject to the Rehire Procedure'!$D:$D,"<="&EOMONTH(B$22,0))
    If this doesn't do what you want I suggest you give us a specific cell on the dashboard sheet that is misreporting and let us know what the expected value should be and why.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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. [SOLVED] Multiple ranges with COUNTIFS formula
    By Artyomaa in forum Excel General
    Replies: 8
    Last Post: 06-03-2017, 02:04 PM
  2. Countifs with multiple ranges (for experts)
    By Habim in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-08-2017, 07:22 PM
  3. SUMIFS/COUNTIFS for multiple conditions/ranges
    By BoudeyCall in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-31-2017, 04:35 PM
  4. SUMIFS/COUNTIFS for multiple conditions/ranges
    By BoudeyCall in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-09-2017, 09:11 PM
  5. [SOLVED] Help with Countifs in multiple ranges & multiple criteria
    By earlcarl13 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-01-2015, 11:41 PM
  6. Countifs with multiple variables and date ranges
    By genichigo in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-25-2015, 03:36 PM
  7. COUNTIFS with multiple non-consecutive ranges
    By Marandopsu in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-08-2014, 08:17 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