+ Reply to Thread
Results 1 to 12 of 12

Countifs Blank Workdays

  1. #1
    Registered User
    Join Date
    03-15-2007
    Location
    Fairfax, Virginia
    MS-Off Ver
    Office 2013, Office 2016, Office 2019, Office 365
    Posts
    12

    Question Countifs Blank Workdays

    I have two columns, column a with data and column b with dates.

    I am trying to come up with a formula to count the number of workdays in the date column (B) where the data column (A) is empty.

    I know =NETWORKDAYS(B2, B10) to get the number of workdays in column b between the dates in rows 2 and 10
    I know =Countif(A2:A10, "") to get the number of blank cells between A2 and A10 (or COUNTBLANK(A2:A10))
    But am stumped on how to combine the two.

  2. #2
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,831

    Re: Countifs Blank Workdays

    What do you mean "how to combine the two". BTW, it's usually best to upload a sample file as shown above in the yellow banner at the top of the page.
    What are you trying to achieve?

  3. #3
    Registered User
    Join Date
    03-15-2007
    Location
    Fairfax, Virginia
    MS-Off Ver
    Office 2013, Office 2016, Office 2019, Office 365
    Posts
    12

    Re: Countifs Blank Workdays

    How to combine the two queries to probably with a countifs formula to get the number of workdays which do not have any corresponding data. File loaded.
    Attached Files Attached Files

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

    Re: Countifs Blank Workdays

    I moved your suggestions for a solution over a couple of columns and then applied the following VBA solution

    Please Login or Register  to view this content.
    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

  5. #5
    Registered User
    Join Date
    03-15-2007
    Location
    Fairfax, Virginia
    MS-Off Ver
    Office 2013, Office 2016, Office 2019, Office 365
    Posts
    12

    Re: Countifs Blank Workdays

    Thank you, that is awesome! But I was hoping not to need VBA and just to have a formula which would be dynamic to copy/paste and tweak the ranges as necessary.

  6. #6
    Forum Contributor
    Join Date
    03-17-2010
    Location
    karachi
    MS-Off Ver
    Excel 2003
    Posts
    113

    Re: Countifs Blank Workdays

    Try this with control+shift+enter
    =SUM(--IF(WEEKDAY($B$2:$B$16)<>1,IF(WEEKDAY($B$2:$B$16)<>7,($A$2:$A$16=""))))

  7. #7
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Countifs Blank Workdays

    Please try

    =SUMPRODUCT((WEEKDAY(B2:B16,2)<6)*(A2:A16=""))

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Countifs Blank Workdays

    Wrecking Crew, please amend your profile to show the Excel version(s) that you use.

    ...or this non-array formula (just use enter):

    =SUMPRODUCT(--(WORKDAY(B2:B16-1,1)=B2:B16)*ISBLANK(A2:A16))
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  9. #9
    Registered User
    Join Date
    03-15-2007
    Location
    Fairfax, Virginia
    MS-Off Ver
    Office 2013, Office 2016, Office 2019, Office 365
    Posts
    12

    Re: Countifs Blank Workdays

    Perfect! Thank you very much!

  10. #10
    Registered User
    Join Date
    03-15-2007
    Location
    Fairfax, Virginia
    MS-Off Ver
    Office 2013, Office 2016, Office 2019, Office 365
    Posts
    12

    Re: Countifs Blank Workdays

    Quote Originally Posted by sohaila View Post
    Try this with control+shift+enter
    =SUM(--IF(WEEKDAY($B$2:$B$16)<>1,IF(WEEKDAY($B$2:$B$16)<>7,($A$2:$A$16=""))))
    Perfect! Thank you very much!

  11. #11
    Registered User
    Join Date
    03-15-2007
    Location
    Fairfax, Virginia
    MS-Off Ver
    Office 2013, Office 2016, Office 2019, Office 365
    Posts
    12

    Re: Countifs Blank Workdays

    Quote Originally Posted by Bo_Ry View Post
    Please try

    =SUMPRODUCT((WEEKDAY(B2:B16,2)<6)*(A2:A16=""))
    Perfect! Thank you very much!

  12. #12
    Registered User
    Join Date
    03-15-2007
    Location
    Fairfax, Virginia
    MS-Off Ver
    Office 2013, Office 2016, Office 2019, Office 365
    Posts
    12

    Re: Countifs Blank Workdays

    Quote Originally Posted by Glenn Kennedy View Post
    Wrecking Crew, please amend your profile to show the Excel version(s) that you use.

    ...or this non-array formula (just use enter):

    =SUMPRODUCT(--(WORKDAY(B2:B16-1,1)=B2:B16)*ISBLANK(A2:A16))
    Perfect! Thank you very much!

    Profile updated - thank you also for pointing me to do this.

+ 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] CountIfs for not blank cells with condition
    By mutzie in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-17-2019, 08:17 PM
  2. [SOLVED] Need help making COUNTIFS formula display as blank if it's 'criteria cell' is blank
    By 27POP27 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-22-2018, 07:38 AM
  3. [SOLVED] Monthly workdays, monthly workdays to date & public holidays
    By blackburnsexcel in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-21-2015, 07:08 AM
  4. [SOLVED] Countifs = blank date
    By xrajncajnx in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-31-2015, 01:04 PM
  5. [SOLVED] COUNTIFS for non-blank cells
    By DSwartz in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-19-2013, 03:39 PM
  6. Countifs should return blank results for blank row of cells
    By Groovicles in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-29-2013, 06:20 PM
  7. [SOLVED] COUNTIFS Not Blank
    By whizbee in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-15-2013, 03:46 PM

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